From 039e6f951ca16bd4183fb29d782dd095d2b4120a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 27 Mar 2016 23:38:46 +0200 Subject: Fix issue with unresolvable usernames --- spec/helpers/application_helper_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/helpers') diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 30b3653ee..d294b9587 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -44,6 +44,11 @@ RSpec.describe ApplicationHelper, type: :helper do status.mentions.create(account: alice) expect(helper.linkify(status)).to match('@alice') end + + it 'leaves mention of unresolvable user alone' do + status = Fabricate(:status, text: 'Hello @foo', account: bob) + expect(helper.linkify(status)).to match('Hello @foo') + end end describe '#account_from_mentions' do -- cgit