Commit 16b61590ab4ca046ea7a2dbab3703367df56d108

Authored by Dmitriy Zaporozhets
1 parent 66ecfa77

Spinach: admin logs, admin users

features/admin/logs.feature
1 1 Feature: Admin Logs
  2 + Background:
  3 + Given I sign in as an admin
2 4  
  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
1 1 Feature: Admin Users
  2 + Background:
  3 + Given I sign in as an admin
  4 + And system has users
2 5  
  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 0 → 100644
... ... @@ -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 0 → 100644
... ... @@ -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,5 +4,9 @@ module SharedAdmin
4 4 And 'there are projects in system' do
5 5 2.times { create(:project) }
6 6 end
  7 +
  8 + And 'system has users' do
  9 + 2.times { create(:user) }
  10 + end
7 11 end
8 12  
... ...