Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-06 18:07:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-06 18:07:26 +0300
commit506159637da758f448818b834f8482238a9eb4eb (patch)
treee114c46da6c1b98451a228b7559f5a6039c5df29 /spec/features/profiles
parent045c0f9554a99c80d0a127540da168e272a9f977 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/user_visits_profile_preferences_page_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
index 4dbdea02e27..b18f763a968 100644
--- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
+++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb
@@ -86,6 +86,23 @@ describe 'User visits the profile preferences page' do
end
end
+ describe 'User changes whitespace in code' do
+ it 'updates their preference' do
+ expect(user.render_whitespace_in_code).to be(false)
+ expect(render_whitespace_field).not_to be_checked
+ render_whitespace_field.click
+
+ click_button 'Save changes'
+
+ expect(user.reload.render_whitespace_in_code).to be(true)
+ expect(render_whitespace_field).to be_checked
+ end
+ end
+
+ def render_whitespace_field
+ find_field('user[render_whitespace_in_code]')
+ end
+
def expect_preferences_saved_message
page.within('.flash-container') do
expect(page).to have_content('Preferences saved.')