added specs: mongoid search by id
This commit is contained in:
parent
378c7d59dd
commit
7088c9e537
|
@ -198,6 +198,12 @@ module Ransack
|
|||
s = Person.search(:only_admin_eq => 'htimS cirA')
|
||||
expect(s.result.selector).to eq({})
|
||||
end
|
||||
|
||||
it 'searches by id' do
|
||||
ids = ['some_bson_id', 'another_bson_id']
|
||||
s = Person.search(:id_in => ids)
|
||||
expect(s.result.selector).to eq({ '_id' => { '$in' => ids } })
|
||||
end
|
||||
end
|
||||
|
||||
describe '#ransackable_attributes' do
|
||||
|
|
Loading…
Reference in New Issue