Split the code into library and application

This commit is contained in:
2023-09-22 07:33:02 +02:00
parent a7114618c1
commit 840290491f
5 changed files with 41 additions and 26 deletions

View File

@ -2,7 +2,17 @@ module SlackBuilder.PackageSpec
( spec
) where
import Test.Hspec (Spec)
import SlackBuilder.Package
import Test.Hspec (Spec, describe, it, shouldBe)
import Text.URI.QQ (uri)
spec :: Spec
spec = pure ()
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