summaryrefslogtreecommitdiff
path: root/spec/helpers/preferences_helper_spec.rb
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2017-09-08 14:48:44 +0000
committerRubén Dávila <ruben@gitlab.com>2017-09-08 14:48:44 +0000
commit52a2423e373e6552023faaff43ae07dbb7423c00 (patch)
treef6855f30c1f0ec08583707d54191e20c2e561e37 /spec/helpers/preferences_helper_spec.rb
parentaf930b83a097f4ab83e6361bc3c210462e507cd9 (diff)
downloadgitlab-ce-52a2423e373e6552023faaff43ae07dbb7423c00.tar.gz
Revert "Merge branch '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'"revert-f2421b2b
This reverts merge request !13619
Diffstat (limited to 'spec/helpers/preferences_helper_spec.rb')
-rw-r--r--spec/helpers/preferences_helper_spec.rb30
1 files changed, 2 insertions, 28 deletions
diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb
index 8b8080563d3..a04c87b08eb 100644
--- a/spec/helpers/preferences_helper_spec.rb
+++ b/spec/helpers/preferences_helper_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe PreferencesHelper do
- describe '#dashboard_choices' do
+ describe 'dashboard_choices' do
it 'raises an exception when defined choices may be missing' do
expect(User).to receive(:dashboards).and_return(foo: 'foo')
expect { helper.dashboard_choices }.to raise_error(RuntimeError)
@@ -26,33 +26,7 @@ describe PreferencesHelper do
end
end
- describe '#user_application_theme' do
- context 'with a user' do
- it "returns user's theme's css_class" do
- stub_user(theme_id: 3)
-
- expect(helper.user_application_theme).to eq 'ui_light'
- end
-
- it 'returns the default when id is invalid' do
- stub_user(theme_id: Gitlab::Themes.count + 5)
-
- allow(Gitlab.config.gitlab).to receive(:default_theme).and_return(1)
-
- expect(helper.user_application_theme).to eq 'ui_indigo'
- end
- end
-
- context 'without a user' do
- it 'returns the default theme' do
- stub_user
-
- expect(helper.user_application_theme).to eq Gitlab::Themes.default.css_class
- end
- end
- end
-
- describe '#user_color_scheme' do
+ describe 'user_color_scheme' do
context 'with a user' do
it "returns user's scheme's css_class" do
allow(helper).to receive(:current_user)