packages feed

signet-0.2025.5.12: source/library/Signet/Unstable/Extra/HttpTest.hs

module Signet.Unstable.Extra.HttpTest where

import qualified Data.ByteString.Char8 as Ascii
import qualified Data.CaseInsensitive as CI
import qualified Signet.Unstable.Extra.Http as Http
import qualified Signet.Unstable.Type.Test as Test

spec :: (Monad tree) => Test.Test tree -> tree ()
spec test = Test.describe test "Signet.Unstable.Extra.Http" $ do
  Test.describe test "hWebhookId" $ do
    Test.it test "creates the correct header name" $ do
      Test.assertEq test Http.hWebhookId (CI.mk (Ascii.pack "webhook-id"))

  Test.describe test "hWebhookSignature" $ do
    Test.it test "creates the correct header name" $ do
      Test.assertEq test Http.hWebhookSignature (CI.mk (Ascii.pack "webhook-signature"))

  Test.describe test "hWebhookTimestamp" $ do
    Test.it test "creates the correct header name" $ do
      Test.assertEq test Http.hWebhookTimestamp (CI.mk (Ascii.pack "webhook-timestamp"))