All Downloads are FREE. Search and download functionalities are using the official Maven repository.

haskell-yesod.api_test.mustache Maven / Gradle / Ivy

There is a newer version: 7.6.0
Show newest version
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Handler.{{classname}}Spec (spec) where

import           TestImport


spec :: Spec
spec = withApp $ do
{{#operations}}
{{#operation}}

    describe "{{vendorExtensions.x-handler}}" $
        it "returns 501 Not Implemented" $ do
{{#vendorExtensions.x-is-get-or-post}}
{{#hasPathParams}}
            {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} $ {{vendorExtensions.x-resource}}{{#pathParams}} {{{vendorExtensions.x-test-value}}}{{/pathParams}}
{{/hasPathParams}}
{{^hasPathParams}}
            {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} {{vendorExtensions.x-resource}}
{{/hasPathParams}}
{{/vendorExtensions.x-is-get-or-post}}
{{^vendorExtensions.x-is-get-or-post}}
{{#hasPathParams}}
            performMethod "{{httpMethod}}" $ {{vendorExtensions.x-resource}}{{#pathParams}} {{{vendorExtensions.x-test-value}}}{{/pathParams}}
{{/hasPathParams}}
{{^hasPathParams}}
            performMethod "{{httpMethod}}" {{vendorExtensions.x-resource}}
{{/hasPathParams}}
{{/vendorExtensions.x-is-get-or-post}}
            statusIs 501
{{/operation}}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy