mirror of
https://github.com/typeable/bloodhound.git
synced 2024-10-05 21:07:20 +03:00
Merge pull request #77 from bitemyapp/doc-error-type
Add test for error parsing
This commit is contained in:
commit
5b66b7c2ba
@ -335,6 +335,11 @@ main = hspec $ do
|
||||
validateStatus resp 200
|
||||
validateStatus deleteResp 200
|
||||
|
||||
describe "error parsing" $ do
|
||||
it "can parse EsErrors" $ withTestEnv $ do
|
||||
res <- getDocument (IndexName "bogus") (MappingName "also_bogus") (DocId "bogus_as_well")
|
||||
let errorResp = eitherDecode (responseBody res)
|
||||
liftIO (errorResp `shouldBe` Right (EsError 404 "IndexMissingException[[bogus] missing]"))
|
||||
|
||||
describe "document API" $ do
|
||||
it "indexes, gets, and then deletes the generated document" $ withTestEnv $ do
|
||||
|
Loading…
Reference in New Issue
Block a user