module SlackBuilder.PackageSpec ( spec ) where import SlackBuilder.Package import Test.Hspec (Spec, describe, it, shouldBe) import Text.URI.QQ (uri) spec :: Spec spec = do describe "renderDownloadWithVersion" $ it "renders text as URL" $ let given = DownloadTemplate $ pure $ StaticPlaceholder "https://example.com" actual = renderDownloadWithVersion given "1.2" expected = Just [uri|https://example.com|] in actual `shouldBe` expected