]> cat aescling's git repositories - mastodon.git/commitdiff
Add test when hashtag and URL are concatenated (#3279)
authorabcang <abcang1015@gmail.com>
Wed, 24 May 2017 13:36:10 +0000 (22:36 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 24 May 2017 13:36:10 +0000 (15:36 +0200)
spec/lib/formatter_spec.rb

index 2e0f111103b7725e50a75f2d6d3ae44ca9525a71..ec61eaa43a022ef159823e51ab49504233c3f41a 100644 (file)
@@ -165,6 +165,14 @@ RSpec.describe Formatter do
         expect(subject).to eq '<p>http://www\.google\.com</p>'
       end
     end
+
+    context 'concatenates hashtag and URL' do
+      let(:local_text) { '#hashtaghttps://www.google.com' }
+
+      it 'has valid hashtag' do
+        expect(subject).to match('/tags/hashtag" class="mention hashtag" rel="tag">#<span>hashtag</span></a>')
+      end
+    end
   end
 
   describe '#reformat' do