diff options
author | Simon Knox <psimyn@gmail.com> | 2019-02-14 17:54:34 +1100 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2019-02-15 21:10:19 +1100 |
commit | 5996fd145ff8d774573e5a0ef22c3b4f0611196f (patch) | |
tree | ab8c31c2ae0c32a2273dd18662550f58f4894580 /spec/views | |
parent | 0328d4faeec093db7744ae5a018174ea4f558a42 (diff) | |
download | gitlab-ce-5996fd145ff8d774573e5a0ef22c3b4f0611196f.tar.gz |
Only load selected syntax highlight CSS
Compile highlight CSS separately
Move highlight-specific mixins out of mixins.scss
Rename solarized themes to match theme name as this was a smaller
change than changing all instances to snake_case
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/layouts/_head.html.haml_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/views/layouts/_head.html.haml_spec.rb b/spec/views/layouts/_head.html.haml_spec.rb index 9d1efcabb80..590dbe7da1f 100644 --- a/spec/views/layouts/_head.html.haml_spec.rb +++ b/spec/views/layouts/_head.html.haml_spec.rb @@ -62,6 +62,14 @@ describe 'layouts/_head' do end end + it 'adds selected syntax highlight stylesheet' do + allow_any_instance_of(PreferencesHelper).to receive(:user_color_scheme).and_return("solarised-light") + + render + + expect(rendered).to match('<link rel="stylesheet" media="all" href="/stylesheets/highlight/solarised-light.css" />') + end + def stub_helper_with_safe_string(method) allow_any_instance_of(PageLayoutHelper).to receive(method) .and_return(%q{foo" http-equiv="refresh}.html_safe) |