diff options
Diffstat (limited to 'spec/lib/slack_markdown_sanitizer_spec.rb')
-rw-r--r-- | spec/lib/slack_markdown_sanitizer_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/slack_markdown_sanitizer_spec.rb b/spec/lib/slack_markdown_sanitizer_spec.rb index f4042439213..d9552542465 100644 --- a/spec/lib/slack_markdown_sanitizer_spec.rb +++ b/spec/lib/slack_markdown_sanitizer_spec.rb @@ -20,4 +20,21 @@ RSpec.describe SlackMarkdownSanitizer, feature_category: :integrations do end end end + + describe '.sanitize_slack_link' do + using RSpec::Parameterized::TableSyntax + + where(:input, :output) do + '' | '' + '[label](url)' | '[label](url)' + '<url|label>' | '<url|label>' + '<a href="url">label</a>' | '<a href="url">label</a>' + end + + with_them do + it 'returns the expected output' do + expect(described_class.sanitize_slack_link(input)).to eq(output) + end + end + end end |