Sha256: f08e9f52451e47bdd4a5431f7cfd5fc0ce605878159f71daad3dfda81e447c41
Contents?: true
Size: 795 Bytes
Versions: 56
Compression:
Stored size: 795 Bytes
Contents
shared_examples_for 'query with text field scoping' do it 'should scope with a text field' do search do text_fields do with(:body, 'test') end end connection.should have_last_search_including(:fq, 'body_textsv:test') end it 'should raise an UnrecognizedFieldError if differently configured text field is used' do lambda do 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 search do text_fields do with(:bogus, 'test') end end end.should raise_error(Sunspot::UnrecognizedFieldError) end end
Version data entries
56 entries across 56 versions & 12 rubygems