diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-08-26 01:24:53 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-08-26 01:32:38 +0300 |
commit | 2c3e42e4a44e2f40e521cbafc8144e5d7c366b76 (patch) | |
tree | 805e249cd96c5cb968cbedd096061beab081b3aa /spec | |
parent | 59180c4f5a553938ee79968e7983aee6ce584ff5 (diff) |
Remove user_color_scheme_class
Instead of rendering this value server-side, we use Javascript and Gon
to apply the user's color scheme (or the default) to any syntax
highlighted code blocks.
This will make it easier to cache these blocks in the future because
they're no longer state-dependent.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/markdown_spec.rb | 4 | ||||
-rw-r--r-- | spec/helpers/preferences_helper_spec.rb | 21 |
2 files changed, 0 insertions, 25 deletions
diff --git a/spec/features/markdown_spec.rb b/spec/features/markdown_spec.rb index 3da4dfc2b23..d32bd4adb52 100644 --- a/spec/features/markdown_spec.rb +++ b/spec/features/markdown_spec.rb @@ -224,8 +224,4 @@ describe 'GitLab Markdown', feature: true do def current_user @feat.user end - - def user_color_scheme_class - :white - end end diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb index d814b562113..b4dee272bfd 100644 --- a/spec/helpers/preferences_helper_spec.rb +++ b/spec/helpers/preferences_helper_spec.rb @@ -48,25 +48,4 @@ describe PreferencesHelper do ] end end - - describe 'user_color_scheme_class' do - context 'with current_user is nil' do - it 'should return a string' do - allow(self).to receive(:current_user).and_return(nil) - expect(user_color_scheme_class).to be_kind_of(String) - end - end - - context 'with a current_user' do - (1..5).each do |color_scheme_id| - context "with color_scheme_id == #{color_scheme_id}" do - it 'should return a string' do - current_user = double(color_scheme_id: color_scheme_id) - allow(self).to receive(:current_user).and_return(current_user) - expect(user_color_scheme_class).to be_kind_of(String) - end - end - end - end - end end |