about summary refs log tree commit diff
path: root/spec/helpers/jsonld_helper_spec.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-20 00:14:50 -0500
committerGitHub <noreply@github.com>2023-02-20 06:14:50 +0100
commit5116347eb7cfd0a09f55efbd84f8d3fa11d4d6ba (patch)
tree02fd0ac43ec43ccb974e4e370f6aeedf223b7d95 /spec/helpers/jsonld_helper_spec.rb
parentbf785df9fe044f2f13bfb93e6860a74084d8eb8a (diff)
Autofix Rubocop RSpec/BeEq (#23740)
Diffstat (limited to 'spec/helpers/jsonld_helper_spec.rb')
-rw-r--r--spec/helpers/jsonld_helper_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/helpers/jsonld_helper_spec.rb b/spec/helpers/jsonld_helper_spec.rb
index debee17f0..ddd4bfe62 100644
--- a/spec/helpers/jsonld_helper_spec.rb
+++ b/spec/helpers/jsonld_helper_spec.rb
@@ -66,14 +66,14 @@ describe JsonLdHelper do
         stub_request(:get, 'https://mallory.test/').to_return body: '{"id": "https://marvin.test/"}'
         stub_request(:get, 'https://marvin.test/').to_return body: '{"id": "https://alice.test/"}'
 
-        expect(fetch_resource('https://mallory.test/', false)).to eq nil
+        expect(fetch_resource('https://mallory.test/', false)).to be_nil
       end
     end
 
     context 'when the second argument is true' do
       it 'returns nil if the retrieved ID and the given URI does not match' do
         stub_request(:get, 'https://mallory.test/').to_return body: '{"id": "https://alice.test/"}'
-        expect(fetch_resource('https://mallory.test/', true)).to eq nil
+        expect(fetch_resource('https://mallory.test/', true)).to be_nil
       end
     end
   end
@@ -81,7 +81,7 @@ describe JsonLdHelper do
   describe '#fetch_resource_without_id_validation' do
     it 'returns nil if the status code is not 200' do
       stub_request(:get, 'https://host.test/').to_return status: 400, body: '{}'
-      expect(fetch_resource_without_id_validation('https://host.test/')).to eq nil
+      expect(fetch_resource_without_id_validation('https://host.test/')).to be_nil
     end
 
     it 'returns hash' do
@@ -150,7 +150,7 @@ describe JsonLdHelper do
         patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
         expect(compacted.dig('object', 'tag', 0, 'href')).to eq ['foo']
-        expect(safe_for_forwarding?(json, compacted)).to eq true
+        expect(safe_for_forwarding?(json, compacted)).to be true
       end
     end
 
@@ -160,14 +160,14 @@ describe JsonLdHelper do
         compacted = compact(json)
         deemed_compatible = patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
-        expect(safe_for_forwarding?(json, compacted)).to eq true
+        expect(safe_for_forwarding?(json, compacted)).to be true
       end
 
       it 'deems an unsafe compacting as such' do
         compacted = compact(json)
         deemed_compatible = patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
-        expect(safe_for_forwarding?(json, compacted)).to eq false
+        expect(safe_for_forwarding?(json, compacted)).to be false
       end
     end
   end