Fix test
This commit is contained in:
parent
188d9bdbf6
commit
e8c1a13dd4
2 changed files with 5 additions and 5 deletions
|
@ -60,8 +60,8 @@ RSpec.describe ActivityPub::Activity::Like do
|
|||
before do
|
||||
stub_request(:get, 'http://example.com/emoji.png').to_return(body: attachment_fixture('emojo.png'))
|
||||
stub_request(:get, 'http://foo.bar/emoji2.png').to_return(body: attachment_fixture('emojo.png'))
|
||||
stub_request(:get, 'https://example.com/aaa').to_return(status: 200, body: Oj.dump(original_emoji))
|
||||
stub_request(:get, 'https://example.com/invalid').to_return(status: 200, body: Oj.dump(original_invalid_emoji))
|
||||
stub_request(:get, 'https://example.com/aaa').to_return(status: 200, body: Oj.dump(original_emoji), headers: { 'Content-Type': 'application/activity+json' })
|
||||
stub_request(:get, 'https://example.com/invalid').to_return(status: 200, body: Oj.dump(original_invalid_emoji), headers: { 'Content-Type': 'application/activity+json' })
|
||||
end
|
||||
|
||||
let(:json) do
|
||||
|
|
|
@ -54,7 +54,7 @@ RSpec.describe ActivityPub::FetchReferencesService, type: :service do
|
|||
subject { described_class.new.call(status, collection_uri) }
|
||||
|
||||
before do
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload))
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload), headers: { 'Content-Type': 'application/activity+json' })
|
||||
end
|
||||
|
||||
it 'first 8 items are returned' do
|
||||
|
@ -83,7 +83,7 @@ RSpec.describe ActivityPub::FetchReferencesService, type: :service do
|
|||
subject { described_class.new.call(status, collection_uri) }
|
||||
|
||||
before do
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload))
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload), headers: { 'Content-Type': 'application/activity+json' })
|
||||
end
|
||||
|
||||
it 'first 8 items are returned' do
|
||||
|
@ -116,7 +116,7 @@ RSpec.describe ActivityPub::FetchReferencesService, type: :service do
|
|||
subject { described_class.new.call(status, collection_uri) }
|
||||
|
||||
before do
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload))
|
||||
stub_request(:get, collection_uri).to_return(status: 200, body: Oj.dump(payload), headers: { 'Content-Type': 'application/activity+json' })
|
||||
end
|
||||
|
||||
it 'first 8 items are returned' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue