Sha256: 26b30df6c5de0171f47b20c472b130ec28f54a14713147ea087d9a24e6ff1881
Contents?: true
Size: 831 Bytes
Versions: 18
Compression:
Stored size: 831 Bytes
Contents
describe 'scoping with text fields', :type => :query do it 'should scope with a text field' do session.search(Post) do text_fields do with(:body, 'test') end end connection.should have_last_search_including(:fq, 'body_texts:test') end it 'should raise an UnrecognizedFieldError if differently configured text field is used' do lambda do session.search(Post, Namespaced::Comment) do text_fields do with(:body, 'test') end end end.should raise_error(Sunspot::UnrecognizedFieldError) end it 'should raise an UnrecognizedFieldError if no field exists' do lambda do session.search(Post) do text_fields do with(:bogus, 'test') end end end.should raise_error(Sunspot::UnrecognizedFieldError) end end
Version data entries
18 entries across 18 versions & 3 rubygems