about summary refs log tree commit diff
path: root/spec/controllers/api/v1/accounts_controller_spec.rb
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-09-09 14:28:08 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-09-09 14:28:08 -0500
commit514fc908a373306b32b2b6b9fc0d849161d88271 (patch)
tree0f0028e424b43dcf4a59b21ccc7170dfe883746b /spec/controllers/api/v1/accounts_controller_spec.rb
parentb9f7bc149b2a6abfbdaee83e6992b617b8bdb18e (diff)
parent11bddd31ce33b654ef72b00221715e6026486e7c (diff)
Merge tag 'v1.6.0rc3' into sync/upstream
Diffstat (limited to 'spec/controllers/api/v1/accounts_controller_spec.rb')
-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