Add checksums to assets in specs
This commit is contained in:
parent
7ee8bfbac4
commit
7a26456875
2 changed files with 6 additions and 7 deletions
|
|
@ -54,13 +54,13 @@ describe ApplicationHelper, :type => :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'includes jquery.js from asset pipeline' do
|
it 'includes jquery.js from asset pipeline' do
|
||||||
expect(helper.jquery_include_tag).to match(/jquery3\.js/)
|
expect(helper.jquery_include_tag).to match(/jquery3-[0-9a-f]{64}\.js/)
|
||||||
expect(helper.jquery_include_tag).not_to match(/jquery\.com/)
|
expect(helper.jquery_include_tag).not_to match(/jquery\.com/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'inclues jquery_ujs.js' do
|
it 'inclues jquery_ujs.js' do
|
||||||
expect(helper.jquery_include_tag).to match(/jquery_ujs\.js/)
|
expect(helper.jquery_include_tag).to match(/jquery_ujs-[0-9a-f]{64}\.js/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "disables ajax caching" do
|
it "disables ajax caching" do
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,10 @@ describe AvatarPresenter do
|
||||||
it "returns the default images if no images set" do
|
it "returns the default images if no images set" do
|
||||||
@profile = FactoryGirl.create(:profile, person: alice.person)
|
@profile = FactoryGirl.create(:profile, person: alice.person)
|
||||||
@presenter = AvatarPresenter.new(@profile)
|
@presenter = AvatarPresenter.new(@profile)
|
||||||
expect(@presenter.base_hash).to eq(
|
expect(@presenter.base_hash.keys).to eq(%i[small medium large])
|
||||||
small: "/assets/user/default.png",
|
expect(@presenter.base_hash[:small]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png})
|
||||||
medium: "/assets/user/default.png",
|
expect(@presenter.base_hash[:medium]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png})
|
||||||
large: "/assets/user/default.png"
|
expect(@presenter.base_hash[:large]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png})
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue