0
0
Fork 0

Fix #4794 - Fake instant follow in API response when account is believed unlocked (#4799)

This commit is contained in:
Eugen Rochko 2017-09-05 17:48:13 +02:00 committed by GitHub
parent 4c3dd0b254
commit 9b994c4aee
3 changed files with 24 additions and 7 deletions

View file

@ -28,6 +28,13 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
expect(response).to have_http_status(:success)
end
it 'returns JSON with following=true and requested=false' do
json = body_as_json
expect(json[:following]).to be true
expect(json[:requested]).to be false
end
it 'creates a following relation between user and target user' do
expect(user.account.following?(other_account)).to be true
end