implemented encodeGemResponse

This commit is contained in:
2021-11-24 19:43:16 -05:00
parent 391ffd3eea
commit 43b76aa39c
4 changed files with 50 additions and 21 deletions

View File

@@ -37,8 +37,7 @@ import Test.Hspec (
describe,
it,
shouldBe,
shouldReturn,
xit)
shouldReturn)
import Network.Gemini.Capsule.Types
import Network.Gemini.Capsule.Internal
@@ -47,7 +46,6 @@ spec :: Spec
spec = describe "Internal" $ do
runConnectionSpec
readURLSpec
sendResponseSpec
strFromConnSpec
readMaxSpec
stripCRLFSpec
@@ -55,7 +53,7 @@ spec = describe "Internal" $ do
runConnectionSpec :: Spec
runConnectionSpec = describe "runConnection" $ mapM_
( \(desc, ioConnRef, handler, mCert, expect) -> context desc $
xit ("should return " ++ show expect) $ do
it ("should return " ++ show expect) $ do
(conn, outRef) <- ioConnRef
runConnection conn handler mCert
readIORef outRef `shouldReturn` expect
@@ -116,9 +114,6 @@ readURLSpec = describe "readURL" $ mapM_
longDir = replicate (1024 - BS.length prefix) 'A'
prefix = "gemini://example.com/"
sendResponseSpec :: Spec
sendResponseSpec = describe "sendResponse" $ return ()
strFromConnSpec :: Spec
strFromConnSpec = describe "strFromConn" $ mapM_
( \(desc, maxLen, ioConn, expect) -> context desc $