about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-05 17:48:13 +0200
committerGitHub <noreply@github.com>2017-09-05 17:48:13 +0200
commit9b994c4aee379f7998d2ddb562a08ccff92e0b0b (patch)
treeee658c5973b3317d58f47942eeb8a0431d81c506 /spec
parent4c3dd0b25472b4d291f607979d255dd406856bef (diff)
Fix #4794 - Fake instant follow in API response when account is believed unlocked (#4799)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/api/v1/accounts_controller_spec.rb7
1 files changed, 7 insertions, 0 deletions
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