beginning query positive validation

This commit is contained in:
Chris Allen 2014-04-11 21:58:38 -05:00
parent 5c31e2a81e
commit 1a57061773

View File

@ -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