diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-22 12:21:03 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-22 12:21:03 +0300 |
commit | 45b3513f12570e367b6ee4e49306cb6115f97c5f (patch) | |
tree | 7da095db39b4a0c0530c58f17df553dbf1aac7ab /spec/views | |
parent | 321e26f34d7a13594dd5e63734bcb6577e389925 (diff) | |
parent | a1e0f387bfc7c01e41c487b598c3828fa89da397 (diff) |
Merge branch '56873-only-load-syntax-highlighting-css-when-selected' into 'master'
Resolve "Only load syntax highlighting css when selected"
Closes #57739 and #56873
See merge request gitlab-org/gitlab-ce!25232
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..cbb4199954a 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/themes/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) |