mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
Add tests to home page url redirect
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user