Upstream sync
This commit was merged in pull request #1.
This commit is contained in:
@@ -136,6 +136,16 @@ describe PgSearchable do
|
||||
expect(DynamicModelWithTagValues.scope_search('tag:red value:"not"')).to contain_exactly(record1, record2)
|
||||
end
|
||||
|
||||
it 'can find models without tags' do
|
||||
record1 = DynamicModelWithTagValues.create name: 'something', value: 'amazing'
|
||||
record2 = DynamicModelWithTagValues.create name: 'new record', value: 'not so amazing'
|
||||
Tag.create(taggable: record1, value: 'green')
|
||||
|
||||
expect(DynamicModelWithTagValues.scope_search('tag:green or value:"not"')).to contain_exactly(record1, record2)
|
||||
end
|
||||
|
||||
|
||||
|
||||
it 'can search in referenced column and in model columns with multiple search terms connected with logical operators' do
|
||||
record1 = DynamicModelWithTagValues.create name: 'something', value: 'amazing'
|
||||
record2 = DynamicModelWithTagValues.create name: 'new record', value: 'not so amazing'
|
||||
|
||||
Reference in New Issue
Block a user