Fix test
This commit is contained in:
parent
80789a603a
commit
ec960ae019
2 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ RSpec/MultipleExpectations:
|
||||||
RSpec/MultipleMemoizedHelpers:
|
RSpec/MultipleMemoizedHelpers:
|
||||||
Max: 17
|
Max: 17
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'spec/lib/activitypub/activity/create_spec.rb'
|
||||||
- 'spec/services/delete_account_service_spec.rb'
|
- 'spec/services/delete_account_service_spec.rb'
|
||||||
- 'spec/services/fan_out_on_write_service_spec.rb'
|
- 'spec/services/fan_out_on_write_service_spec.rb'
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
||||||
}.with_indifferent_access
|
}.with_indifferent_access
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:conversation) do
|
let(:conversation_hash) do
|
||||||
{
|
{
|
||||||
id: 'http://example.com/conversation',
|
id: 'http://example.com/conversation',
|
||||||
type: 'Group',
|
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/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/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/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)
|
stub_request(:get, 'http://example.com/invalid-conversation').to_return(status: 404)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue