about summary refs log tree commit diff
path: root/spec/lib
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2017-05-10 01:17:41 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-09 18:17:41 +0200
commit08e94d1b197a053504ce37dbbe03216a80043b10 (patch)
treea4dc7f3d2cb63c318383654e3d26dbf431f43731 /spec/lib
parent2fba94b36eac65a368ec10f4c8c5808baa0179e7 (diff)
Fixed bug that timeline can not be displayed by InvalidURIError (#2947)
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/formatter_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/formatter_spec.rb b/spec/lib/formatter_spec.rb
index 81eaf00e8..791bcce86 100644
--- a/spec/lib/formatter_spec.rb
+++ b/spec/lib/formatter_spec.rb
@@ -123,6 +123,13 @@ RSpec.describe Formatter do
         expect(subject).to match '<p>&lt;img src=&quot;javascript:alert(&apos;XSS&apos;);&quot;&gt;</p>'
       end
     end
+
+    context 'contains invalid URL' do
+      let(:local_text) { 'http://www\.google\.com' }
+      it 'has valid url' do
+        expect(subject).to eq '<p>http://www\.google\.com</p>'
+      end
+    end
   end
 
   describe '#reformat' do