diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-16 12:50:18 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-16 12:53:04 -0400 |
commit | 41dadc37a55460f27eba860b385993f4a8ed268a (patch) | |
tree | f161ad783be9489330ff60de5d381028f862a693 | |
parent | a28686d3317efab7fe407e86ddf08bbac71b1a96 (diff) | |
download | gitlab-ce-rs-custom-dashboard-backport.tar.gz |
Fix Preferences feature specrs-custom-dashboard-backport
-rw-r--r-- | spec/features/profiles/preferences_spec.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb index c4d9281b1f0..e1182e82f5a 100644 --- a/spec/features/profiles/preferences_spec.rb +++ b/spec/features/profiles/preferences_spec.rb @@ -1,10 +1,8 @@ require 'spec_helper' describe 'Profile > Preferences' do - let(:user) { create(:user) } - before do - login_as(user) + login_as(:user) visit profile_preferences_path end @@ -13,27 +11,27 @@ describe 'Profile > Preferences' do let(:theme_5_class) { Gitlab::Theme.css_class_by_id(5) } it 'creates a flash message' do - choose "user_theme_id_#{theme.id}" + choose 'user_theme_id_5' expect_preferences_saved_message end it 'updates their preference' do - choose "user_theme_id_#{theme.id}" + choose 'user_theme_id_5' allowing_for_delay do visit page.current_path - expect(page).to have_checked_field("user_theme_id_#{theme.id}") + expect(page).to have_checked_field("user_theme_id_5") end end it 'reflects the changes immediately' do - expect(page).to have_selector("body.#{default.css_class}") + expect(page).to have_selector("body.#{default_class}") - choose "user_theme_id_#{theme.id}" + choose 'user_theme_id_5' - expect(page).not_to have_selector("body.#{default.css_class}") - expect(page).to have_selector("body.#{theme.css_class}") + expect(page).not_to have_selector("body.#{default_class}") + expect(page).to have_selector("body.#{theme_5_class}") end end |