diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-08 09:53:35 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-08 09:53:35 -0800 |
commit | 57a65ede77b7bbae6e3b2a7aa52135de7b0c2f8e (patch) | |
tree | 3f1d72a04c3deefb8a911d013e686b036541af60 /features | |
parent | 8589b4e137f50293952923bb07e2814257d7784d (diff) | |
download | gitlab-ce-57a65ede77b7bbae6e3b2a7aa52135de7b0c2f8e.tar.gz |
Improve application settings and write tests
Diffstat (limited to 'features')
-rw-r--r-- | features/admin/settings.feature | 9 | ||||
-rw-r--r-- | features/steps/admin/settings.rb | 16 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 4 |
3 files changed, 29 insertions, 0 deletions
diff --git a/features/admin/settings.feature b/features/admin/settings.feature new file mode 100644 index 00000000000..8799c053ea2 --- /dev/null +++ b/features/admin/settings.feature @@ -0,0 +1,9 @@ +@admin +Feature: Admin Settings + Background: + Given I sign in as an admin + And I visit admin settings page + + Scenario: Change application settings + When I disable gravatars and save form + Then I should be see gravatar disabled diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb new file mode 100644 index 00000000000..e8168e85def --- /dev/null +++ b/features/steps/admin/settings.rb @@ -0,0 +1,16 @@ +class Spinach::Features::AdminSettings < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + include Gitlab::CurrentSettings + + step 'I disable gravatars and save form' do + uncheck 'Gravatar enabled' + click_button 'Save' + end + + step 'I should be see gravatar disabled' do + current_application_settings.gravatar_enabled.should be_false + page.should have_content 'Application settings saved successfully' + end +end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index e657fceb704..689b297dffc 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -167,6 +167,10 @@ module SharedPaths visit admin_teams_path end + step 'I visit admin settings page' do + visit admin_application_settings_path + end + # ---------------------------------------- # Generic Project # ---------------------------------------- |