Skip to content

Commit

Permalink
fixup! Test: A provider creation helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mdimjasevic committed Dec 20, 2023
1 parent d9848e7 commit 9db75e2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions integration/test/Test/Services.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ testUpdateServiceUpdateAcceptHeader = do
email <- randomEmail
alice <- randomUser dom def
provider <- setupProvider alice def {newProviderEmail = email}
providerId <- provider %. "id" & asString
service <- newService dom providerId def
serviceId <- service %. "id"
pId <- provider %. "id" & asString
service <- newService dom pId def
sIs <- service %. "id"
void $
updateService
dom
providerId
serviceId
(Just "application/json")
(Just "brand new service")
updateService dom pId sIs (Just "application/json") (Just "brand new service")
>>= getBody 200
void $
updateService dom pId sIs (Just "text/plain") (Just "even newer service")
>>= getBody 200
void $
updateService dom pId sIs Nothing (Just "really old service")
>>= getBody 200

0 comments on commit 9db75e2

Please sign in to comment.