Merge remote-tracking branch 'parent/main' into upstream-20240906

This commit is contained in:
KMY 2024-09-06 08:42:24 +09:00
commit f18eabfe75
689 changed files with 4369 additions and 2434 deletions

View file

@ -2,7 +2,7 @@
require 'rails_helper'
describe '/api/v1/accounts' do
RSpec.describe '/api/v1/accounts' do
let(:user) { Fabricate(:user) }
let(:scopes) { '' }
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
@ -122,10 +122,11 @@ describe '/api/v1/accounts' do
expect(response).to have_http_status(200)
json = body_as_json
expect(json[:following]).to be true
expect(json[:requested]).to be false
expect(body_as_json)
.to include(
following: true,
requested: false
)
expect(user.account.following?(other_account)).to be true
end
@ -141,10 +142,11 @@ describe '/api/v1/accounts' do
expect(response).to have_http_status(200)
json = body_as_json
expect(json[:following]).to be false
expect(json[:requested]).to be true
expect(body_as_json)
.to include(
following: false,
requested: true
)
expect(user.account.requested?(other_account)).to be true
end