Sha256: 727928a5693b6d16769bd8f845ba578fa1d9263e938eb3b34353f663f8e30ea5
Contents?: true
Size: 694 Bytes
Versions: 2
Compression:
Stored size: 694 Bytes
Contents
describe 'typed query' do it 'properly escapes namespaced type names' do session.search(Namespaced::Comment) connection.should have_last_search_with(:q => 'type:Namespaced\:\:Comment') end it 'builds search for multiple types' do session.search(Post, Namespaced::Comment) connection.should have_last_search_with(:q => 'type:(Post OR Namespaced\:\:Comment)') end it 'searches type of subclass when superclass is configured' do session.search PhotoPost connection.should have_last_search_with(:q => 'type:PhotoPost') end it 'raises an ArgumentError if no types given to search' do lambda { session.search }.should raise_error(ArgumentError) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
benjaminkrause-sunspot-0.9.7 | spec/api/query/types_spec.rb |
benjaminkrause-sunspot-0.9.8 | spec/api/query/types_spec.rb |