From 1a57061773ba59a62a93135808d9237033c6b7f9 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Fri, 11 Apr 2014 21:58:38 -0500 Subject: [PATCH] beginning query positive validation --- tests/tests.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/tests.hs b/tests/tests.hs index ad847ba..459fd7d 100644 --- a/tests/tests.hs +++ b/tests/tests.hs @@ -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