Add important test for full-width hashtags (#3911)

lolsob-rspec
Eugen Rochko 2017-06-23 17:01:53 +02:00 committed by GitHub
parent 539dbaa049
commit 8fb81e1372
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ RSpec.describe Tag, type: :model do
it 'does not match URLs with hashtag-like anchors' do it 'does not match URLs with hashtag-like anchors' do
expect(subject.match('https://en.wikipedia.org/wiki/Ghostbusters_(song)#Lawsuit')).to be_nil expect(subject.match('https://en.wikipedia.org/wiki/Ghostbusters_(song)#Lawsuit')).to be_nil
end end
it 'matches #' do
expect(subject.match('this is #')).to_not be_nil
end
end end
describe '.search_for' do describe '.search_for' do