Merge remote-tracking branch 'parent/main' into upstream-20240906
This commit is contained in:
commit
f18eabfe75
689 changed files with 4369 additions and 2434 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'API V1 Statuses Histories' do
|
||||
RSpec.describe 'API V1 Statuses Histories' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
let(:scopes) { 'read:statuses' }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'API V1 Statuses Mutes' do
|
||||
RSpec.describe 'API V1 Statuses Mutes' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
let(:scopes) { 'write:mutes' }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'Pins' do
|
||||
RSpec.describe 'Pins' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:scopes) { 'write:accounts' }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'API V1 Statuses Reblogs' do
|
||||
RSpec.describe 'API V1 Statuses Reblogs' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
let(:scopes) { 'write:statuses' }
|
||||
|
@ -24,11 +24,14 @@ describe 'API V1 Statuses Reblogs' do
|
|||
|
||||
expect(user.account.reblogged?(status)).to be true
|
||||
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:reblog][:id]).to eq status.id.to_s
|
||||
expect(hash_body[:reblog][:reblogs_count]).to eq 1
|
||||
expect(hash_body[:reblog][:reblogged]).to be true
|
||||
expect(body_as_json)
|
||||
.to include(
|
||||
reblog: include(
|
||||
id: status.id.to_s,
|
||||
reblogs_count: 1,
|
||||
reblogged: true
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -57,11 +60,12 @@ describe 'API V1 Statuses Reblogs' do
|
|||
|
||||
expect(user.account.reblogged?(status)).to be false
|
||||
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:id]).to eq status.id.to_s
|
||||
expect(hash_body[:reblogs_count]).to eq 0
|
||||
expect(hash_body[:reblogged]).to be false
|
||||
expect(body_as_json)
|
||||
.to include(
|
||||
id: status.id.to_s,
|
||||
reblogs_count: 0,
|
||||
reblogged: false
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -81,11 +85,12 @@ describe 'API V1 Statuses Reblogs' do
|
|||
|
||||
expect(user.account.reblogged?(status)).to be false
|
||||
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:id]).to eq status.id.to_s
|
||||
expect(hash_body[:reblogs_count]).to eq 0
|
||||
expect(hash_body[:reblogged]).to be false
|
||||
expect(body_as_json)
|
||||
.to include(
|
||||
id: status.id.to_s,
|
||||
reblogs_count: 0,
|
||||
reblogged: false
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ RSpec.describe 'Sources' do
|
|||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(body_as_json).to eq({
|
||||
expect(body_as_json).to match({
|
||||
id: status.id.to_s,
|
||||
text: status.text,
|
||||
spoiler_text: status.spoiler_text,
|
||||
|
@ -51,7 +51,7 @@ RSpec.describe 'Sources' do
|
|||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(body_as_json).to eq({
|
||||
expect(body_as_json).to match({
|
||||
id: status.id.to_s,
|
||||
text: status.text,
|
||||
spoiler_text: status.spoiler_text,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'API V1 Statuses Translations' do
|
||||
RSpec.describe 'API V1 Statuses Translations' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||
let(:scopes) { 'read:statuses' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue