about summary refs log tree commit diff
path: root/spec/workers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2024-02-16 11:56:12 +0100
committerStarfall <us@starfall.systems>2024-02-16 11:19:46 -0600
commit41a1757aecf7d894965b45abece8cbc408f8f99c (patch)
tree857a5c25e55a4cd7311ac32059c8ee597ff2335c /spec/workers
parent8f6a0c2cc87d4515ffa3be0ab8768ced5dcb5850 (diff)
Merge pull request from GHSA-jhrq-qvrm-qr36 hotfix
* Fix insufficient Content-Type checking of fetched ActivityStreams objects

* Allow JSON-LD documents with multiple profiles
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/activitypub/fetch_replies_worker_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/workers/activitypub/fetch_replies_worker_spec.rb b/spec/workers/activitypub/fetch_replies_worker_spec.rb
index 91ef3c4b9..64cfcd8cb 100644
--- a/spec/workers/activitypub/fetch_replies_worker_spec.rb
+++ b/spec/workers/activitypub/fetch_replies_worker_spec.rb
@@ -21,7 +21,7 @@ describe ActivityPub::FetchRepliesWorker do
 
   describe 'perform' do
     it 'performs a request if the collection URI is from the same host' do
-      stub_request(:get, 'https://example.com/statuses_replies/1').to_return(status: 200, body: json)
+      stub_request(:get, 'https://example.com/statuses_replies/1').to_return(status: 200, body: json, headers: { 'Content-Type': 'application/activity+json' })
       subject.perform(status.id, 'https://example.com/statuses_replies/1')
       expect(a_request(:get, 'https://example.com/statuses_replies/1')).to have_been_made.once
     end