2019-09-30 12:06:01 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-03 20:31:53 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 09:08:32 +00:00
|
|
|
RSpec.describe DeferScriptTagHelper do
|
2017-08-03 20:31:53 +00:00
|
|
|
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
|