purescript-httpurple/test/Test/HTTPure/StatusSpec.purs
Connor Prussin 8295d8755e
Clean up imports (#185)
* Clean up import declarations to only use qualified when necessary

* Remove unused imports
2021-11-18 22:16:35 -08:00

24 lines
544 B
Haskell

module Test.HTTPure.StatusSpec where
import Prelude
import Effect.Class (liftEffect)
import Test.Spec (describe, it)
import HTTPure.Status (write)
import Test.HTTPure.TestHelpers (Test, (?=), mockResponse, getResponseStatus)
writeSpec :: Test
writeSpec =
describe "write" do
it "writes the given status code" do
status <-
liftEffect do
mock <- mockResponse
write mock 123
pure $ getResponseStatus mock
status ?= 123
statusSpec :: Test
statusSpec =
describe "Status" do
writeSpec