diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-03 20:31:53 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-03 20:31:53 +0000 |
commit | dab08be606878139ce3fe3d8e197ef73badf8e88 (patch) | |
tree | 7693b5595ed61943879eec4bb4ee71dff75af3c0 /spec/helpers | |
parent | db271a6b051f9630d5dfb3acbbd78f150cb3f23f (diff) | |
download | gitlab-ce-dab08be606878139ce3fe3d8e197ef73badf8e88.tar.gz |
Resolve "Specific Async Script Loading by using a Page Variable"
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/defer_script_tag_helper_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/helpers/defer_script_tag_helper_spec.rb b/spec/helpers/defer_script_tag_helper_spec.rb new file mode 100644 index 00000000000..d10b6f134e4 --- /dev/null +++ b/spec/helpers/defer_script_tag_helper_spec.rb @@ -0,0 +1,13 @@ +# coding: utf-8 +require 'spec_helper' + +describe DeferScriptTagHelper do + describe 'script tag' do + script_url = 'test.js' + + it 'returns an script tag with defer=true' do + expect(javascript_include_tag(script_url).to_s) + .to eq "<script src=\"/javascripts/#{script_url}\" defer=\"defer\"></script>" + end + end +end |