Combine API request spec assertions (#31970)
This commit is contained in:
@@ -23,15 +23,10 @@ RSpec.describe 'Suggestions' do
|
||||
|
||||
it_behaves_like 'forbidden for wrong scope', 'write'
|
||||
|
||||
it 'returns http success' do
|
||||
it 'returns http success with accounts' do
|
||||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'returns accounts' do
|
||||
subject
|
||||
|
||||
expect(response.parsed_body)
|
||||
.to contain_exactly(include(id: bob.id.to_s), include(id: jeff.id.to_s))
|
||||
end
|
||||
@@ -72,15 +67,10 @@ RSpec.describe 'Suggestions' do
|
||||
|
||||
it_behaves_like 'forbidden for wrong scope', 'read'
|
||||
|
||||
it 'returns http success' do
|
||||
it 'returns http success and removes suggestion' do
|
||||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'removes the specified suggestion' do
|
||||
subject
|
||||
|
||||
expect(FollowRecommendationMute.exists?(account: user.account, target_account: jeff)).to be true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user