Commit e7f77255 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add tests to home page url redirect

parent 41d7be3c
......@@ -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
......
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment