diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-16 16:09:20 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-16 19:39:13 -0800 |
commit | b9d09a0c5ee43a58f2c19b37f590b2124bb10a25 (patch) | |
tree | 351372c13bbfa4eae1b2ce7cab075c281cb4665b | |
parent | 4a49a937cdac3beb8e00373accfc5873e0d51b37 (diff) | |
download | gitlab-ce-b9d09a0c5ee43a58f2c19b37f590b2124bb10a25.tar.gz |
Add tests to home page url redirect
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 1 | ||||
-rw-r--r-- | features/admin/settings.feature | 4 | ||||
-rw-r--r-- | features/steps/admin/settings.rb | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 481e7882300..9423a207068 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -29,6 +29,7 @@ = f.label :home_page_url, class: 'control-label' .col-sm-10 = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com' + %span.help-block We will redirect non-logged in users to this page .form-group = f.label :sign_in_text, class: 'control-label' .col-sm-10 diff --git a/features/admin/settings.feature b/features/admin/settings.feature index 8799c053ea2..8fdf0575c2c 100644 --- a/features/admin/settings.feature +++ b/features/admin/settings.feature @@ -5,5 +5,5 @@ Feature: Admin Settings And I visit admin settings page Scenario: Change application settings - When I disable gravatars and save form - Then I should be see gravatar disabled + When I modify settings and save form + Then I should see application settings saved diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb index e8168e85def..c2d0d2a3fa3 100644 --- a/features/steps/admin/settings.rb +++ b/features/steps/admin/settings.rb @@ -4,13 +4,15 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps include SharedAdmin include Gitlab::CurrentSettings - step 'I disable gravatars and save form' do + step 'I modify settings and save form' do uncheck 'Gravatar enabled' + fill_in 'Home page url', with: 'https://about.gitlab.com/' click_button 'Save' end - step 'I should be see gravatar disabled' do + step 'I should see application settings saved' do current_application_settings.gravatar_enabled.should be_false + current_application_settings.home_page_url.should == 'https://about.gitlab.com/' page.should have_content 'Application settings saved successfully' end end |