This commit is contained in:
KMY 2024-05-03 12:08:51 +09:00
parent 80789a603a
commit ec960ae019
2 changed files with 3 additions and 2 deletions

View file

@ -38,6 +38,7 @@ RSpec/MultipleExpectations:
RSpec/MultipleMemoizedHelpers:
Max: 17
Exclude:
- 'spec/lib/activitypub/activity/create_spec.rb'
- 'spec/services/delete_account_service_spec.rb'
- 'spec/services/fan_out_on_write_service_spec.rb'

View file

@ -16,7 +16,7 @@ RSpec.describe ActivityPub::Activity::Create do
}.with_indifferent_access
end
let(:conversation) do
let(:conversation_hash) do
{
id: 'http://example.com/conversation',
type: 'Group',
@ -30,7 +30,7 @@ RSpec.describe ActivityPub::Activity::Create do
stub_request(:get, 'http://example.com/attachment.png').to_return(request_fixture('avatar.txt'))
stub_request(:get, 'http://example.com/emoji.png').to_return(body: attachment_fixture('emojo.png'))
stub_request(:get, 'http://example.com/emojib.png').to_return(body: attachment_fixture('emojo.png'), headers: { 'Content-Type' => 'application/octet-stream' })
stub_request(:get, 'http://example.com/conversation').to_return(body: Oj.dump(conversation), headers: { 'Content-Type': 'application/activity+json' })
stub_request(:get, 'http://example.com/conversation').to_return(body: Oj.dump(conversation_hash), headers: { 'Content-Type': 'application/activity+json' })
stub_request(:get, 'http://example.com/invalid-conversation').to_return(status: 404)
end