about summary refs log tree commit diff
path: root/spec/lib/html_aware_formatter_spec.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
committerStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
commit4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch)
tree6811b845bb7f4966b10dcefa3dea404246f161c7 /spec/lib/html_aware_formatter_spec.rb
parent65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff)
parentbed63f6dae0879ac840066b031229e0d139089cd (diff)
Merge remote-tracking branch 'glitch/main' HEAD main
Diffstat (limited to 'spec/lib/html_aware_formatter_spec.rb')
-rw-r--r--spec/lib/html_aware_formatter_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/lib/html_aware_formatter_spec.rb b/spec/lib/html_aware_formatter_spec.rb
index 18d23abf5..315035957 100644
--- a/spec/lib/html_aware_formatter_spec.rb
+++ b/spec/lib/html_aware_formatter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe HtmlAwareFormatter do
@@ -9,7 +11,7 @@ RSpec.describe HtmlAwareFormatter do
       let(:text) { 'Foo bar' }
 
       it 'returns formatted text' do
-        is_expected.to eq '<p>Foo bar</p>'
+        expect(subject).to eq '<p>Foo bar</p>'
       end
     end
 
@@ -20,7 +22,7 @@ RSpec.describe HtmlAwareFormatter do
         let(:text) { 'Beep boop' }
 
         it 'keeps the plain text' do
-          is_expected.to include 'Beep boop'
+          expect(subject).to include 'Beep boop'
         end
       end
 
@@ -28,7 +30,7 @@ RSpec.describe HtmlAwareFormatter do
         let(:text) { '<script>alert("Hello")</script>' }
 
         it 'strips the scripts' do
-          is_expected.to_not include '<script>alert("Hello")</script>'
+          expect(subject).to_not include '<script>alert("Hello")</script>'
         end
       end
 
@@ -36,7 +38,7 @@ RSpec.describe HtmlAwareFormatter do
         let(:text) { '<span class="mention  status__content__spoiler-link">Show more</span>' }
 
         it 'strips the malicious classes' do
-          is_expected.to_not include 'status__content__spoiler-link'
+          expect(subject).to_not include 'status__content__spoiler-link'
         end
       end
     end