about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-17 21:59:57 -0500
committerGitHub <noreply@github.com>2023-02-18 03:59:57 +0100
commite5cf23cf3a45cee0abe2e3ad4de1b8c03bcb6f73 (patch)
tree554b54b1576a253f31aa616a2a68f32418f070cf /spec/services
parentefd424506accea3ddc21ff77a3ca5b7946e00211 (diff)
Enable Rubocop RSpec/HooksBeforeExamples (#23668)
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/fetch_resource_service_spec.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/services/fetch_resource_service_spec.rb b/spec/services/fetch_resource_service_spec.rb
index 0c0c306fe..8cd4a3bfb 100644
--- a/spec/services/fetch_resource_service_spec.rb
+++ b/spec/services/fetch_resource_service_spec.rb
@@ -62,6 +62,7 @@ RSpec.describe FetchResourceService, type: :service do
 
       before do
         stub_request(:get, url).to_return(status: 200, body: body, headers: headers)
+        stub_request(:get, 'http://example.com/foo').to_return(status: 200, body: json, headers: { 'Content-Type' => 'application/activity+json' })
       end
 
       it 'signs request' do
@@ -89,11 +90,6 @@ RSpec.describe FetchResourceService, type: :service do
         it { is_expected.to eq [1, { prefetched_body: body, id: true }] }
       end
 
-      before do
-        stub_request(:get, url).to_return(status: 200, body: body, headers: headers)
-        stub_request(:get, 'http://example.com/foo').to_return(status: 200, body: json, headers: { 'Content-Type' => 'application/activity+json' })
-      end
-
       context 'when link header is present' do
         let(:headers) { { 'Link' => '<http://example.com/foo>; rel="alternate"; type="application/activity+json"', } }