about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/application_helper_spec.rb5
1 files changed, 5 insertions, 0 deletions
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('<a href="http://test.host/users/alice" class="mention">@<span>alice</span></a>')
     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