summaryrefslogtreecommitdiff
path: root/tests/SlackBuilder
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-03-19 11:34:19 +0100
committerEugen Wissner <belka@caraus.de>2024-03-19 11:34:19 +0100
commitbc3ba48d851f4f46f0ab33547efa39fa1fb0414a (patch)
tree530c32bea8c2034da4506c461673a6b6205423c9 /tests/SlackBuilder
parent3d81917627188cdbd8809729ecde7e20e21a1a43 (diff)
downloadslackbuilder-bc3ba48d851f4f46f0ab33547efa39fa1fb0414a.tar.gz
Recognize + in sematnic tags
Diffstat (limited to 'tests/SlackBuilder')
-rw-r--r--tests/SlackBuilder/InfoSpec.hs4
-rw-r--r--tests/SlackBuilder/LatestVersionCheckSpec.hs24
-rw-r--r--tests/SlackBuilder/PackageSpec.hs4
3 files changed, 32 insertions, 0 deletions
diff --git a/tests/SlackBuilder/InfoSpec.hs b/tests/SlackBuilder/InfoSpec.hs
index 301db54..c05aa3e 100644
--- a/tests/SlackBuilder/InfoSpec.hs
+++ b/tests/SlackBuilder/InfoSpec.hs
@@ -1,3 +1,7 @@
+{- This Source Code Form is subject to the terms of the Mozilla Public License,
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ obtain one at https://mozilla.org/MPL/2.0/. -}
+
module SlackBuilder.InfoSpec
( spec
) where
diff --git a/tests/SlackBuilder/LatestVersionCheckSpec.hs b/tests/SlackBuilder/LatestVersionCheckSpec.hs
new file mode 100644
index 0000000..fe92176
--- /dev/null
+++ b/tests/SlackBuilder/LatestVersionCheckSpec.hs
@@ -0,0 +1,24 @@
+{- This Source Code Form is subject to the terms of the Mozilla Public License,
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ obtain one at https://mozilla.org/MPL/2.0/. -}
+
+module SlackBuilder.LatestVersionCheckSpec
+ ( spec
+ ) where
+
+import SlackBuilder.LatestVersionCheck
+import Test.Hspec (Spec, describe, it, shouldBe)
+
+spec :: Spec
+spec = do
+ describe "stableTagTransform" $ do
+ it "excludes tags with +" $
+ let given = "v2.6.0+unreleased"
+ actual = stableTagTransform given
+ in actual `shouldBe` Nothing
+
+ it "recognizes a stable version" $
+ let given = "v2.6.0"
+ actual = stableTagTransform given
+ expected = Just "2.6.0"
+ in actual `shouldBe` expected
diff --git a/tests/SlackBuilder/PackageSpec.hs b/tests/SlackBuilder/PackageSpec.hs
index ffe6737..2a34c89 100644
--- a/tests/SlackBuilder/PackageSpec.hs
+++ b/tests/SlackBuilder/PackageSpec.hs
@@ -1,3 +1,7 @@
+{- This Source Code Form is subject to the terms of the Mozilla Public License,
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ obtain one at https://mozilla.org/MPL/2.0/. -}
+
module SlackBuilder.PackageSpec
( spec
) where