1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00

Make results order-independent.

This commit is contained in:
Jon Frisby 2020-11-28 12:43:44 -08:00
parent 1fbca34db3
commit b1b945fcae

View file

@ -8,7 +8,8 @@ module Ransack
result = ProviderCalendar.
ransack({ "account_email_cont" => "account1", "user_email_eq" => "user2@somedomain.com" }).
result.
map(&:provider_id)
map(&:provider_id).
sort
expect(result).to eq(["account1_user2@mail.com", "aksshkdhak@whatever.provider.com"])
end
@ -19,7 +20,8 @@ module Ransack
result = ProviderCalendar.
ransack({ "user_email_eq" => "user2@somedomain.com", "account_email_cont" => "account1" }).
result.
map(&:provider_id)
map(&:provider_id).
sort
expect(result).to eq(["account1_user2@mail.com", "aksshkdhak@whatever.provider.com"])
end