Merge pull request #487 from motiz88/nitpick
Minor proofreading in InsertSpec
This commit is contained in:
@@ -21,7 +21,7 @@ import TestTypes(IncPK(..), CompoundPK(..))
|
|||||||
spec :: DbStructure -> H.Connection -> Spec
|
spec :: DbStructure -> H.Connection -> Spec
|
||||||
spec struct c = beforeAll_ resetDb $ around (withApp cfgDefault struct c) $ do
|
spec struct c = beforeAll_ resetDb $ around (withApp cfgDefault struct c) $ do
|
||||||
describe "Posting new record" $ do
|
describe "Posting new record" $ do
|
||||||
context "disparate csv types" $ do
|
context "disparate json types" $ do
|
||||||
it "accepts disparate json types" $ do
|
it "accepts disparate json types" $ do
|
||||||
p <- post "/menagerie"
|
p <- post "/menagerie"
|
||||||
[json| {
|
[json| {
|
||||||
@@ -130,7 +130,7 @@ spec struct c = beforeAll_ resetDb $ around (withApp cfgDefault struct c) $ do
|
|||||||
it "fails returning a 409 Conflict" $
|
it "fails returning a 409 Conflict" $
|
||||||
post "/simple_pk" [json| { "k":"k1", "extra":"e1" } |] `shouldRespondWith` 409
|
post "/simple_pk" [json| { "k":"k1", "extra":"e1" } |] `shouldRespondWith` 409
|
||||||
|
|
||||||
context "attempting to insert a row with confliting unique constraint" $
|
context "attempting to insert a row with conflicting unique constraint" $
|
||||||
it "fails returning a 409 Conflict" $
|
it "fails returning a 409 Conflict" $
|
||||||
post "/withUnique" [json| { "uni":"nodup", "extra":"e2" } |] `shouldRespondWith` 409
|
post "/withUnique" [json| { "uni":"nodup", "extra":"e2" } |] `shouldRespondWith` 409
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ spec struct c = beforeAll_ resetDb $ around (withApp cfgDefault struct c) $ do
|
|||||||
|
|
||||||
describe "Putting record" $ do
|
describe "Putting record" $ do
|
||||||
|
|
||||||
context "to unkonwn uri" $
|
context "to unknown uri" $
|
||||||
it "gives a 404" $ do
|
it "gives a 404" $ do
|
||||||
pendingWith "Decide on PUT usefullness"
|
pendingWith "Decide on PUT usefullness"
|
||||||
request methodPut "/fake" []
|
request methodPut "/fake" []
|
||||||
@@ -316,7 +316,7 @@ spec struct c = beforeAll_ resetDb $ around (withApp cfgDefault struct c) $ do
|
|||||||
|
|
||||||
describe "Patching record" $ do
|
describe "Patching record" $ do
|
||||||
|
|
||||||
context "to unkonwn uri" $
|
context "to unknown uri" $
|
||||||
it "gives a 404" $
|
it "gives a 404" $
|
||||||
request methodPatch "/fake" []
|
request methodPatch "/fake" []
|
||||||
[json| { "real": false } |]
|
[json| { "real": false } |]
|
||||||
|
|||||||
Reference in New Issue
Block a user