diff --git a/spec/helpers/markdown_helper_spec.rb b/spec/helpers/markdown_helper_spec.rb index c6c387da..23674ee3 100644 --- a/spec/helpers/markdown_helper_spec.rb +++ b/spec/helpers/markdown_helper_spec.rb @@ -62,6 +62,14 @@ describe MarkdownHelper, :type => :helper do it 'should not process any markup aside of links' do expect(question_markdown('**your account has been disabled**, [click here to enable it again](https://evil.example.com)')). to eq('

**your account has been disabled**, [click here to enable it again](https://evil.example.com)

') end + + it 'should not raise an exception if an invalid link is processed' do + expect{ question_markdown('https://example.com/example.質問') }.not_to raise_error + end + + it 'should not process invalid links' do + expect(question_markdown('https://example.com/example.質問')).to eq('

https://example.com/example.質問

') + end end describe '#raw_markdown' do