diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-03-29 08:27:05 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-03-29 08:27:05 +1100 |
commit | e06015379739ce6ee57318d35d18e274f4e930a6 (patch) | |
tree | e08034039b11984d692e2efbdf4675d4379c806d /spec | |
parent | ad831ace7ed8d2ed999b15f8350aaa51f0490124 (diff) | |
download | gitlab-ce-e06015379739ce6ee57318d35d18e274f4e930a6.tar.gz |
Make user mentions case-insensitive
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/banzai/filter/user_reference_filter_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/user_reference_filter_spec.rb b/spec/lib/banzai/filter/user_reference_filter_spec.rb index 9873774909e..63b23dac7ed 100644 --- a/spec/lib/banzai/filter/user_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/user_reference_filter_spec.rb @@ -83,6 +83,14 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do expect(doc.css('a').length).to eq 1 end + it 'links to a User with different case-sensitivity' do + user = create(:user, username: 'RescueRanger') + + doc = reference_filter("Hey #{user.to_reference.upcase}") + expect(doc.css('a').length).to eq 1 + expect(doc.css('a').text).to eq(user.to_reference) + end + it 'includes a data-user attribute' do doc = reference_filter("Hey #{reference}") link = doc.css('a').first |