mirror of
https://github.com/typeable/bloodhound.git
synced 2025-01-05 21:36:03 +03:00
beginning query positive validation
This commit is contained in:
parent
5c31e2a81e
commit
1a57061773
@ -101,6 +101,15 @@ main = hspec $ do
|
||||
(responseBody docInserted) :: Either String (EsResult Tweet)
|
||||
fmap _source newTweet `shouldBe` Right exampleTweet
|
||||
|
||||
describe "query API" $ do
|
||||
it "returns document for term query and identity filter" $ do
|
||||
_ <- insertData
|
||||
let query = TermQuery (Term "user" "bitemyapp") Nothing
|
||||
let filter = IdentityFilter <&&> IdentityFilter
|
||||
let search = mkSearch (Just query) (Just filter)
|
||||
myTweet <- searchTweet search
|
||||
myTweet `shouldBe` Right exampleTweet
|
||||
|
||||
describe "filtering API" $ do
|
||||
it "returns document for composed boolmatch and identity" $ do
|
||||
_ <- insertData
|
||||
|
Loading…
Reference in New Issue
Block a user