diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 1109c2a4c..c7564c5be 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -54,13 +54,13 @@ describe ApplicationHelper, :type => :helper do end 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/) end end 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 it "disables ajax caching" do diff --git a/spec/presenters/avatar_presenter_spec.rb b/spec/presenters/avatar_presenter_spec.rb index 0a7daea6a..f51b4ef83 100644 --- a/spec/presenters/avatar_presenter_spec.rb +++ b/spec/presenters/avatar_presenter_spec.rb @@ -10,11 +10,10 @@ describe AvatarPresenter do it "returns the default images if no images set" do @profile = FactoryGirl.create(:profile, person: alice.person) @presenter = AvatarPresenter.new(@profile) - expect(@presenter.base_hash).to eq( - small: "/assets/user/default.png", - medium: "/assets/user/default.png", - large: "/assets/user/default.png" - ) + expect(@presenter.base_hash.keys).to eq(%i[small medium large]) + expect(@presenter.base_hash[:small]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png}) + expect(@presenter.base_hash[:medium]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png}) + expect(@presenter.base_hash[:large]).to match(%r{/assets/user/default-[0-9a-f]{64}\.png}) end end end