diff --git a/spec/helpers/container_summary_helper_spec.rb b/spec/helpers/container_summary_helper_spec.rb index 6941b634b5d..0a4f5dc974d 100644 --- a/spec/helpers/container_summary_helper_spec.rb +++ b/spec/helpers/container_summary_helper_spec.rb @@ -1,7 +1,7 @@ describe ContainerSummaryHelper do let(:container_project) { FactoryGirl.create(:container_project) } - let(:rel_hash_with_link) { [:label, :image, :value, :link, :title] } - let(:rel_hash_without_link) { [:label, :image, :value] } + let(:rel_hash_with_link) { [:label, :value, :link, :title] } + let(:rel_hash_without_link) { [:label, :value] } before do self.class.send(:include, ApplicationHelper) @@ -14,13 +14,13 @@ it 'show link when role allows' do stub_user(:features => :all) - expect(subject.keys).to eq(rel_hash_with_link) + expect(subject.keys).to include(*rel_hash_with_link) expect(subject[:value]).to eq(container_project.name) end it 'hide link when role does not allow' do stub_user(:features => :none) - expect(subject.keys).to eq(rel_hash_without_link) + expect(subject.keys).to include(*rel_hash_without_link) expect(subject[:value]).to eq(container_project.name) end end @@ -31,13 +31,13 @@ it 'show link when role allows' do stub_user(:features => :all) - expect(subject.keys).to eq(rel_hash_with_link) + expect(subject.keys).to include(*rel_hash_with_link) expect(subject[:value]).to eq("2") end it 'hide link when role does not allow' do stub_user(:features => :none) - expect(subject.keys).to eq(rel_hash_without_link) + expect(subject.keys).to include(*rel_hash_without_link) expect(subject[:value]).to eq("2") end end