mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 13:05:12 +01:00
Fix deprecation warnings on activitypub controller specs (#2357)
This commit is contained in:
parent
55e1e12b7d
commit
948dd26931
@ -13,7 +13,7 @@ RSpec.describe Api::Activitypub::ActivitiesController, type: :controller do
|
|||||||
public_status = Status.create!(account: user.account, text: 'Hello world', visibility: :public)
|
public_status = Status.create!(account: user.account, text: 'Hello world', visibility: :public)
|
||||||
|
|
||||||
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
||||||
get :show_status, id: public_status.id
|
get :show_status, params: { id: public_status.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
@ -48,7 +48,7 @@ RSpec.describe Api::Activitypub::ActivitiesController, type: :controller do
|
|||||||
reblog = Status.create!(account: user.account, reblog_of_id: original.id, visibility: :public)
|
reblog = Status.create!(account: user.account, reblog_of_id: original.id, visibility: :public)
|
||||||
|
|
||||||
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
||||||
get :show_status, id: reblog.id
|
get :show_status, params: { id: reblog.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
|
@ -14,7 +14,7 @@ RSpec.describe Api::Activitypub::NotesController, type: :controller do
|
|||||||
public_status = Status.create!(account: user_alice.account, text: 'Hello world', visibility: :public)
|
public_status = Status.create!(account: user_alice.account, text: 'Hello world', visibility: :public)
|
||||||
|
|
||||||
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
||||||
get :show, id: public_status.id
|
get :show, params: { id: public_status.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
@ -50,7 +50,7 @@ RSpec.describe Api::Activitypub::NotesController, type: :controller do
|
|||||||
reply = Status.create!(account: user_bob.account, text: 'Hello world', in_reply_to_id: original.id, visibility: :public)
|
reply = Status.create!(account: user_bob.account, text: 'Hello world', in_reply_to_id: original.id, visibility: :public)
|
||||||
|
|
||||||
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
@request.env['HTTP_ACCEPT'] = 'application/activity+json'
|
||||||
get :show, id: reply.id
|
get :show, params: { id: reply.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
|
@ -19,7 +19,7 @@ RSpec.describe Api::Activitypub::OutboxController, type: :controller do
|
|||||||
Status.create!(account: user.account, text: 'Hello world', visibility: :unlisted)
|
Status.create!(account: user.account, text: 'Hello world', visibility: :unlisted)
|
||||||
Status.create!(account: user.account, text: 'Hello world', visibility: :direct)
|
Status.create!(account: user.account, text: 'Hello world', visibility: :direct)
|
||||||
|
|
||||||
get :show, id: user.account.id
|
get :show, params: { id: user.account.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
@ -59,7 +59,7 @@ RSpec.describe Api::Activitypub::OutboxController, type: :controller do
|
|||||||
|
|
||||||
describe 'first page' do
|
describe 'first page' do
|
||||||
before do
|
before do
|
||||||
get :show, id: user.account.id
|
get :show, params: { id: user.account.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
|
Loading…
Reference in New Issue
Block a user