diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-05 13:57:01 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-13 17:58:16 -0400 |
commit | 0c0c31ff34b3010c2c269ec56ef48dd305c6f74a (patch) | |
tree | bc9bfe8512f3a7abc694f77bdd4824ed7d80b3de /spec/features/profiles/preferences_spec.rb | |
parent | 44d68159999a0ee30f7714470c1ef5b0c4a717fa (diff) | |
download | gitlab-ce-0c0c31ff34b3010c2c269ec56ef48dd305c6f74a.tar.gz |
Move the "Design" templates and logic to Preferences
Diffstat (limited to 'spec/features/profiles/preferences_spec.rb')
-rw-r--r-- | spec/features/profiles/preferences_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb new file mode 100644 index 00000000000..0e033652a9c --- /dev/null +++ b/spec/features/profiles/preferences_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper' + +describe 'Profile > Preferences' do + let(:user) { create(:user) } + + before do + login_as(user) + end + + describe 'User changes their application theme', js: true do + let(:default_class) { Gitlab::Theme.css_class_by_id(nil) } + let(:theme_5_class) { Gitlab::Theme.css_class_by_id(5) } + + before do + visit profile_preferences_path + end + + it 'changes immediately' do + expect(page).to have_selector("body.#{default.css_class}") + + choose "user_theme_id_#{theme.id}" + + expect(page).not_to have_selector("body.#{default.css_class}") + expect(page).to have_selector("body.#{theme.css_class}") + end + end + + describe 'User changes their syntax highlighting theme' do + before do + visit profile_preferences_path + end + end +end |