From 9b994c4aee379f7998d2ddb562a08ccff92e0b0b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 5 Sep 2017 17:48:13 +0200 Subject: Fix #4794 - Fake instant follow in API response when account is believed unlocked (#4799) --- spec/controllers/api/v1/accounts_controller_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec') diff --git a/spec/controllers/api/v1/accounts_controller_spec.rb b/spec/controllers/api/v1/accounts_controller_spec.rb index c13509e7b..05df2f844 100644 --- a/spec/controllers/api/v1/accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts_controller_spec.rb @@ -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 -- cgit