mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 05:08:03 +00:00
Enable and fill in JSON response test in API::AccountsController (#3157)
This commit is contained in:
parent
7eb8b2efad
commit
8c5eaf7ae9
|
@ -234,8 +234,23 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
|
||||||
expect(response).to have_http_status(:success)
|
expect(response).to have_http_status(:success)
|
||||||
end
|
end
|
||||||
|
|
||||||
xit 'returns JSON with correct data' do
|
it 'returns JSON with correct data' do
|
||||||
# todo
|
json = body_as_json
|
||||||
|
|
||||||
|
expect(json).to be_a Enumerable
|
||||||
|
expect(json.first[:id]).to be simon.id
|
||||||
|
expect(json.first[:following]).to be true
|
||||||
|
expect(json.first[:followed_by]).to be false
|
||||||
|
expect(json.first[:muting]).to be false
|
||||||
|
expect(json.first[:requested]).to be false
|
||||||
|
expect(json.first[:domain_blocking]).to be false
|
||||||
|
|
||||||
|
expect(json.second[:id]).to be lewis.id
|
||||||
|
expect(json.second[:following]).to be false
|
||||||
|
expect(json.second[:followed_by]).to be true
|
||||||
|
expect(json.second[:muting]).to be false
|
||||||
|
expect(json.second[:requested]).to be false
|
||||||
|
expect(json.second[:domain_blocking]).to be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue