git.iko.soy/typeable/bloodhound
on master help sign in
paranoia and formatting
commit576512da8647359e079902326d2643af5762e6b8 authorChris Allen <cma@bitemyapp.com> dateSun 6 Apr 2014, 22:51 (13 years ago) parent031bac3
1 file changed+3−1
tests/tests.hs+3−1
tests/tests.hs+3−1
@@ -30,7 +30,8 @@ instance ToJSON Tweet
3030instance FromJSON Tweet
3131
3232exampleTweet = Tweet { user = "bitemyapp"
33− , postDate = UTCTime (ModifiedJulianDay 55000)
33+ , postDate = UTCTime
34+ (ModifiedJulianDay 55000)
3435 (secondsToDiffTime 10)
3536 , message = "Use haskell!" }
3637
@@ -48,6 +49,7 @@ main = hspec $ do
4849 it "indexes, gets, and then deletes the generated document" $ do
4950 let tweet = exampleTweet
5051 let encoded = encode tweet
52+ _ <- deleteExampleIndex
5153 created <- createExampleIndex
5254 docCreated <- indexDocument (Server "http://localhost:9200") "twitter" "tweet" tweet "1"
5355 docInserted <- getDocument (Server "http://localhost:9200") "twitter" "tweet" "1"