Skip to content

Commit 16b6159

Browse files
committed
Spinach: admin logs, admin users
1 parent 66ecfa7 commit 16b6159

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

features/admin/logs.feature

+5
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
Feature: Admin Logs
2+
Background:
3+
Given I sign in as an admin
24

5+
Scenario: On Admin Logs
6+
Given I visit admin logs page
7+
Then I should see tabs with available logs

features/admin/users.feature

+6
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
Feature: Admin Users
2+
Background:
3+
Given I sign in as an admin
4+
And system has users
25

6+
Scenario: On Admin Users
7+
Given I visit admin users page
8+
Then I should see all users

features/steps/admin/admin_logs.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class AdminLogs < Spinach::FeatureSteps
2+
include SharedAuthentication
3+
include SharedPaths
4+
include SharedAdmin
5+
6+
Then 'I should see tabs with available logs' do
7+
page.should have_content 'production.log'
8+
page.should have_content 'githost.log'
9+
page.should have_content 'application.log'
10+
end
11+
end

features/steps/admin/admin_users.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class AdminUsers < Spinach::FeatureSteps
2+
include SharedAuthentication
3+
include SharedPaths
4+
include SharedAdmin
5+
6+
Then 'I should see all users' do
7+
User.all.each do |user|
8+
page.should have_content user.name
9+
end
10+
end
11+
end

features/steps/shared/admin.rb

+4
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ module SharedAdmin
44
And 'there are projects in system' do
55
2.times { create(:project) }
66
end
7+
8+
And 'system has users' do
9+
2.times { create(:user) }
10+
end
711
end
812

0 commit comments

Comments
 (0)