mirror of
https://github.com/typeable/bloodhound.git
synced 2024-09-11 08:25:32 +03:00
paranoia and formatting
This commit is contained in:
parent
031bac3d7d
commit
576512da86
@ -30,7 +30,8 @@ instance ToJSON Tweet
|
||||
instance FromJSON Tweet
|
||||
|
||||
exampleTweet = Tweet { user = "bitemyapp"
|
||||
, postDate = UTCTime (ModifiedJulianDay 55000)
|
||||
, postDate = UTCTime
|
||||
(ModifiedJulianDay 55000)
|
||||
(secondsToDiffTime 10)
|
||||
, message = "Use haskell!" }
|
||||
|
||||
@ -48,6 +49,7 @@ main = hspec $ do
|
||||
it "indexes, gets, and then deletes the generated document" $ do
|
||||
let tweet = exampleTweet
|
||||
let encoded = encode tweet
|
||||
_ <- deleteExampleIndex
|
||||
created <- createExampleIndex
|
||||
docCreated <- indexDocument (Server "http://localhost:9200") "twitter" "tweet" tweet "1"
|
||||
docInserted <- getDocument (Server "http://localhost:9200") "twitter" "tweet" "1"
|
||||
|
Loading…
Reference in New Issue
Block a user