2022-03-26 04:47:05 +00:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
{-# LANGUAGE QuasiQuotes #-}
|
|
|
|
|
|
|
|
module AppSpec (spec) where
|
|
|
|
|
|
|
|
import Lib (app)
|
|
|
|
import Test.Hspec
|
|
|
|
import Test.Hspec.Wai
|
|
|
|
import Test.Hspec.Wai.JSON
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
main = hspec spec
|
|
|
|
|
|
|
|
spec :: Spec
|
2022-03-26 21:11:24 +00:00
|
|
|
spec = with (return $ app "tutor.db") $ do
|
2022-03-26 04:47:05 +00:00
|
|
|
describe "GET /search" $ do
|
|
|
|
it "responds with 200" $ do
|
|
|
|
get "/search" `shouldRespondWith` 200
|