Add tests for unfurl_auto_link_display with mailto
@@ -63,6 +63,11 @@ import wee_slack
'output': "url: https://example.com (example.com) suffix",
'auto_link_display': 'both',
},
+ {
+ 'input': "url: <mailto:name@example.com|name@example.com> suffix",
+ 'output': "url: mailto:name@example.com (name@example.com) suffix",
+ 'auto_link_display': 'both',
+ },
{
'input': "url: <https://example.com|example.com> suffix",
'output': "url: example.com suffix",
@@ -73,6 +78,11 @@ import wee_slack
'output': "url: https://example.com (different text) suffix",
'auto_link_display': 'text',
},
+ {
+ 'input': "url: <mailto:name@example.com|name@example.com> suffix",
+ 'output': "url: name@example.com suffix",
+ 'auto_link_display': 'text',
+ },
{
'input': "url: <https://example.com|different text> suffix",
'output': "url: https://example.com (different text) suffix",
@@ -83,6 +93,11 @@ import wee_slack
'output': "url: https://example.com suffix",
'auto_link_display': 'url',
},
+ {
+ 'input': "url: <mailto:name@example.com|name@example.com> suffix",
+ 'output': "url: mailto:name@example.com suffix",
+ 'auto_link_display': 'url',
+ },
{
'input': "<@U407ABLLW> multiple unfurl <https://example.com|example with spaces>",
'output': "@alice multiple unfurl https://example.com (example with spaces)",
