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:
authorRobert Speicher <rspeicher@gmail.com>2015-08-26 01:24:53 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-08-26 01:32:38 +0300
commit2c3e42e4a44e2f40e521cbafc8144e5d7c366b76 (patch)
tree805e249cd96c5cb968cbedd096061beab081b3aa /spec/helpers
parent59180c4f5a553938ee79968e7983aee6ce584ff5 (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/helpers')
-rw-r--r--spec/helpers/preferences_helper_spec.rb21
1 files changed, 0 insertions, 21 deletions
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