Skip to content

Commit

Permalink
Improve history spec
Browse files Browse the repository at this point in the history
Ignore order of returned keys
  • Loading branch information
gridanjbf authored and tagliala committed Nov 8, 2021
1 parent 936a085 commit 5d5c328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/chrono_model/time_machine/history_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
describe 'does not add as_of_time when there are aggregates' do
it { expect($t.foo.history.select('max(id)').to_sql).to_not match(/as_of_time/) }

it { expect($t.foo.history.except(:order).select('max(id) as foo, min(id) as bar').group('id').first.attributes.keys).to eq %w( id foo bar ) }
it { expect($t.foo.history.except(:order).select('max(id) as foo, min(id) as bar').group('id').first.attributes.keys).to match_array %w( id foo bar ) }
end

context '.sorted' do
Expand Down

0 comments on commit 5d5c328

Please sign in to comment.