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

This commit is contained in:
KMY 2024-04-24 08:57:07 +09:00
commit 32a8f367a3
91 changed files with 1073 additions and 446 deletions

View file

@ -28,6 +28,20 @@ RSpec.describe 'credentials API' do
locked: true,
})
end
describe 'allows the read:me scope' do
let(:scopes) { 'read:me' }
it 'returns the response successfully' do
subject
expect(response).to have_http_status(200)
expect(body_as_json).to include({
locked: true,
})
end
end
end
describe 'PATCH /api/v1/accounts/update_credentials' do

View file

@ -40,7 +40,7 @@ RSpec.describe UpdateStatusService do
end
it 'saves edit history' do
expect(status.edits.pluck(:text)).to eq %w(Foo Bar)
expect(status.edits.ordered.pluck(:text)).to eq %w(Foo Bar)
end
end
@ -58,7 +58,7 @@ RSpec.describe UpdateStatusService do
end
it 'saves edit history' do
expect(status.edits.pluck(:text, :spoiler_text)).to eq [['Foo', ''], ['Foo', 'Bar']]
expect(status.edits.ordered.pluck(:text, :spoiler_text)).to eq [['Foo', ''], ['Foo', 'Bar']]
end
end
@ -134,7 +134,7 @@ RSpec.describe UpdateStatusService do
end
it 'saves edit history' do
expect(status.edits.pluck(:ordered_media_attachment_ids)).to eq [[detached_media_attachment.id], [attached_media_attachment.id]]
expect(status.edits.ordered.pluck(:ordered_media_attachment_ids)).to eq [[detached_media_attachment.id], [attached_media_attachment.id]]
end
end
@ -156,7 +156,7 @@ RSpec.describe UpdateStatusService do
end
it 'saves edit history' do
expect(status.edits.map { |edit| edit.ordered_media_attachments.map(&:description) }).to eq [['Old description'], ['New description']]
expect(status.edits.ordered.map { |edit| edit.ordered_media_attachments.map(&:description) }).to eq [['Old description'], ['New description']]
end
end
@ -185,7 +185,7 @@ RSpec.describe UpdateStatusService do
end
it 'saves edit history' do
expect(status.edits.pluck(:poll_options)).to eq [%w(Foo Bar), %w(Bar Baz Foo)]
expect(status.edits.ordered.pluck(:poll_options)).to eq [%w(Foo Bar), %w(Bar Baz Foo)]
end
it 'requeues expiration notification' do