diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-09 19:38:27 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-09 19:38:27 +0200 |
commit | 16b61590ab4ca046ea7a2dbab3703367df56d108 (patch) | |
tree | af15f200f896e7225680cbc4f9a459c182c06efd | |
parent | 66ecfa77e5105c8a8151db899e3d3a09dba3024e (diff) | |
download | gitlab-ce-16b61590ab4ca046ea7a2dbab3703367df56d108.tar.gz |
Spinach: admin logs, admin users
-rw-r--r-- | features/admin/logs.feature | 5 | ||||
-rw-r--r-- | features/admin/users.feature | 6 | ||||
-rw-r--r-- | features/steps/admin/admin_logs.rb | 11 | ||||
-rw-r--r-- | features/steps/admin/admin_users.rb | 11 | ||||
-rw-r--r-- | features/steps/shared/admin.rb | 4 |
5 files changed, 37 insertions, 0 deletions
diff --git a/features/admin/logs.feature b/features/admin/logs.feature index 74c38fea86f..d07f0048080 100644 --- a/features/admin/logs.feature +++ b/features/admin/logs.feature @@ -1,2 +1,7 @@ Feature: Admin Logs + Background: + Given I sign in as an admin + Scenario: On Admin Logs + Given I visit admin logs page + Then I should see tabs with available logs diff --git a/features/admin/users.feature b/features/admin/users.feature index d18061e0cce..03ac86a367b 100644 --- a/features/admin/users.feature +++ b/features/admin/users.feature @@ -1,2 +1,8 @@ Feature: Admin Users + Background: + Given I sign in as an admin + And system has users + Scenario: On Admin Users + Given I visit admin users page + Then I should see all users diff --git a/features/steps/admin/admin_logs.rb b/features/steps/admin/admin_logs.rb new file mode 100644 index 00000000000..83958545c4d --- /dev/null +++ b/features/steps/admin/admin_logs.rb @@ -0,0 +1,11 @@ +class AdminLogs < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + + Then 'I should see tabs with available logs' do + page.should have_content 'production.log' + page.should have_content 'githost.log' + page.should have_content 'application.log' + end +end diff --git a/features/steps/admin/admin_users.rb b/features/steps/admin/admin_users.rb new file mode 100644 index 00000000000..1828ae705ce --- /dev/null +++ b/features/steps/admin/admin_users.rb @@ -0,0 +1,11 @@ +class AdminUsers < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + + Then 'I should see all users' do + User.all.each do |user| + page.should have_content user.name + end + end +end diff --git a/features/steps/shared/admin.rb b/features/steps/shared/admin.rb index bd1e5cec735..1b712dc6d04 100644 --- a/features/steps/shared/admin.rb +++ b/features/steps/shared/admin.rb @@ -4,5 +4,9 @@ module SharedAdmin And 'there are projects in system' do 2.times { create(:project) } end + + And 'system has users' do + 2.times { create(:user) } + end end |