From 1a25bb501f8afefd48f155f0c1ccb3078f129889 Mon Sep 17 00:00:00 2001 From: Jacky Hu Date: Fri, 17 Jun 2016 10:27:46 +0800 Subject: [PATCH] Add 415 test for openapi req on none root path --- test/Feature/StructureSpec.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Feature/StructureSpec.hs b/test/Feature/StructureSpec.hs index 1a81d6a2a..3d0b18608 100644 --- a/test/Feature/StructureSpec.hs +++ b/test/Feature/StructureSpec.hs @@ -87,6 +87,11 @@ spec = do in D4.fetchFilesystemAndValidate schemaContext ((fromJust . decode) respBody) `shouldReturn` Right () + it "should respond to openapi request on none root path with 415" $ + request methodGet "/none_root_path" + (acceptHdrs "application/openapi+json") "" + `shouldRespondWith` 415 + describe "Table info" $ do it "The structure of complex views is correctly detected" $ request methodOptions "/filtered_tasks" [] "" `shouldRespondWith`