Use "match_array" only for order independent assertions (#3626)
This commit is contained in:
parent
d3bbef27e7
commit
0f1b1d78b1
4 changed files with 7 additions and 7 deletions
|
@ -266,7 +266,7 @@ describe ApplicationController, type: :controller do
|
|||
shared_examples 'receives :with_includes' do |fabricator, klass|
|
||||
it 'uses raw if it is not an ActiveRecord::Relation' do
|
||||
record = Fabricate(fabricator)
|
||||
expect(C.new.cache_collection([record], klass)).to match_array([record])
|
||||
expect(C.new.cache_collection([record], klass)).to eq [record]
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -277,7 +277,7 @@ describe ApplicationController, type: :controller do
|
|||
record = Fabricate(fabricator)
|
||||
relation = klass.none
|
||||
allow(relation).to receive(:cache_ids).and_return([record])
|
||||
expect(C.new.cache_collection(relation, klass)).to match_array([record])
|
||||
expect(C.new.cache_collection(relation, klass)).to eq [record]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue