Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Feb 27, 2024
1 parent f89a7f5 commit 71e101d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Test/Controller/ParamSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@ createControllerContextWithParams params =
requestBody = FormBody { params, files = [] }
request = Wai.defaultRequest
requestContext = RequestContext { request, respond = error "respond", requestBody, vault = error "vault", frameworkConfig = error "frameworkConfig" }
in FrozenControllerContext { requestContext, customFields = TypeMap.empty }
in FrozenControllerContext { requestContext, customFields = TypeMap.empty, logger = error "logger is missing" }

createControllerContextWithJson params =
let
requestBody = JSONBody { jsonPayload = Just (json params), rawPayload = cs params }
request = Wai.defaultRequest
requestContext = RequestContext { request, respond = error "respond", requestBody, vault = error "vault", frameworkConfig = error "frameworkConfig" }
in FrozenControllerContext { requestContext, customFields = TypeMap.empty }
in FrozenControllerContext { requestContext, customFields = TypeMap.empty, logger = error "logger is missing" }

json :: Text -> Aeson.Value
json string =
Expand Down
2 changes: 1 addition & 1 deletion Test/View/CSSFrameworkSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -722,4 +722,4 @@ createControllerContextWithCSSFramework cssFramework = do
let requestBody = FormBody { params = [], files = [] }
let request = Wai.defaultRequest
let requestContext = RequestContext { request, respond = error "respond", requestBody, vault = error "vault", frameworkConfig = frameworkConfig }
pure FrozenControllerContext { requestContext, customFields = TypeMap.empty }
pure FrozenControllerContext { requestContext, customFields = TypeMap.empty, logger = requestContext.frameworkConfig.logger }
2 changes: 1 addition & 1 deletion Test/View/FormSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ createControllerContext = do
let requestBody = FormBody { params = [], files = [] }
let request = Wai.defaultRequest
let requestContext = RequestContext { request, respond = undefined, requestBody, vault = undefined, frameworkConfig = frameworkConfig }
pure FrozenControllerContext { requestContext, customFields = mempty }
pure FrozenControllerContext { requestContext, customFields = mempty, logger = requestContext.frameworkConfig.logger }

data Project' = Project {id :: (Id' "projects"), title :: Text, meta :: MetaBag} deriving (Eq, Show)
instance InputValue Project where inputValue = IHP.ModelSupport.recordToInputValue
Expand Down

0 comments on commit 71e101d

Please sign in to comment.