chore: fix tests
This commit is contained in:
parent
f853e1816a
commit
66fd3c8c76
@ -57,8 +57,8 @@ frontend:build:
|
||||
artifacts:
|
||||
paths:
|
||||
- static
|
||||
- well-known
|
||||
- config/webpack.yml
|
||||
- config/favicon.json
|
||||
name: "${CI_JOB_NAME}"
|
||||
expire_in: "1 day"
|
||||
dependencies:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
module Settings.WellKnownFiles
|
||||
( WellKnownFileName
|
||||
( WellKnownFileName(..)
|
||||
, getWellKnownR
|
||||
, wellKnownHtmlLinks
|
||||
) where
|
||||
|
||||
@ -24,6 +24,11 @@ instance Arbitrary (Route EmbeddedStatic) where
|
||||
paramNum <- getNonNegative <$> arbitrary
|
||||
params <- replicateM paramNum $ (,) <$> printableText' <*> printableText
|
||||
return $ embeddedResourceR path params
|
||||
|
||||
|
||||
instance Arbitrary WellKnownFileName where
|
||||
arbitrary = genericArbitrary
|
||||
shrink = genericShrink
|
||||
|
||||
instance Arbitrary SchoolR where
|
||||
arbitrary = genericArbitrary
|
||||
|
||||
@ -6,12 +6,12 @@ spec :: Spec
|
||||
spec = withApp $ do
|
||||
describe "robots.txt" $ do
|
||||
it "gives a 200" $ do
|
||||
get RobotsR
|
||||
get $ WellKnownR RobotsTxt
|
||||
statusIs 200
|
||||
it "has correct User-agent" $ do
|
||||
get RobotsR
|
||||
get $ WellKnownR RobotsTxt
|
||||
bodyContains "User-agent: *"
|
||||
describe "favicon.ico" $ do
|
||||
it "gives a 200" $ do
|
||||
get FaviconR
|
||||
get $ WellKnownR FaviconIco
|
||||
statusIs 200
|
||||
|
||||
@ -53,6 +53,7 @@ import Control.Monad.Catch as X hiding (Handler(..))
|
||||
import Control.Monad.Trans.Resource (runResourceT)
|
||||
|
||||
import Settings
|
||||
import Settings.WellKnownFiles as X
|
||||
|
||||
import Data.CaseInsensitive as X (CI)
|
||||
import qualified Data.CaseInsensitive as CI
|
||||
|
||||
Loading…
Reference in New Issue
Block a user