Combine API request spec assertions (#31970)

This commit is contained in:
Matt Jankowski 2024-09-19 06:15:21 -04:00 committed by GitHub
parent 1fce55cf5d
commit b071e618e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 36 additions and 232 deletions

View file

@ -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