about summary refs log tree commit diff
path: root/spec/lib
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
committerThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
commit9adeaf2bfc1c16ca70e611b5288886b21414217b (patch)
tree53372bc9bd6f38d158aad50c768e18773b7d3f3b /spec/lib
parenta8c109baca4d02cc8aed454e231518c1f8ec1844 (diff)
parent4bae4e972d43f71bffb888ac82c180b2fa3f1ada (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/statuses_controller.rb`:
  Minor conflict due to theming system
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/formatter_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/formatter_spec.rb b/spec/lib/formatter_spec.rb
index 83be0a588..633d59c2a 100644
--- a/spec/lib/formatter_spec.rb
+++ b/spec/lib/formatter_spec.rb
@@ -258,6 +258,14 @@ RSpec.describe Formatter do
         is_expected.to include 'href="xmpp:muc@instance.com?join"'
       end
     end
+
+    context 'given text containing a magnet: URI' do
+      let(:text) { 'wikipedia gives this example of a magnet uri: magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a' }
+
+      it 'matches the full URI' do
+        is_expected.to include 'href="magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a"'
+      end
+    end
   end
 
   describe '#format_spoiler' do