diff options
Diffstat (limited to 'test/Tests/Writers/Jira.hs')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index 48626487e..57ed27360 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -28,5 +28,39 @@ tests = imageWith ("", [], [("align", "right"), ("height", "50")]) "image.png" "" mempty =?> "!image.png|align=right, height=50!" + + , testGroup "links" + [ "external link" =: + link "https://example.com/test.php" "" "test" =?> + "[test|https://example.com/test.php]" + + , "external link without description" =: + link "https://example.com/tmp.js" "" "https://example.com/tmp.js" =?> + "[https://example.com/tmp.js]" + + , "email link" =: + link "mailto:me@example.com" "" "Jane" =?> + "[Jane|mailto:me@example.com]" + + , "email link without description" =: + link "mailto:me@example.com" "" "me@example.com" =?> + "[mailto:me@example.com]" + + , "attachment link" =: + linkWith ("", ["attachment"], []) "foo.txt" "" "My file" =?> + "[My file^foo.txt]" + + , "attachment link without description" =: + linkWith ("", ["attachment"], []) "foo.txt" "" "foo.txt" =?> + "[^foo.txt]" + + , "user link" =: + linkWith ("", ["user-account"], []) "~johndoe" "" "John Doe" =?> + "[John Doe|~johndoe]" + + , "user link with user as description" =: + linkWith ("", ["user-account"], []) "~johndoe" "" "~johndoe" =?> + "[~johndoe]" + ] ] ] |