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

This commit is contained in:
KMY 2024-06-18 07:43:33 +09:00
commit aa2cdc898a
271 changed files with 1839 additions and 1397 deletions

View file

@ -113,7 +113,7 @@ RSpec.describe 'Domain Allows' do
end
context 'with invalid domain name' do
let(:params) { 'foo bar' }
let(:params) { { domain: 'foo bar' } }
it 'returns http unprocessable entity' do
subject

View file

@ -282,6 +282,32 @@ describe '/api/v1/statuses' do
expect(response).to have_http_status(404)
end
end
context 'when scheduling a status' do
let(:params) { { status: 'Hello world', scheduled_at: 10.minutes.from_now } }
let(:account) { user.account }
it 'returns HTTP 200' do
subject
expect(response).to have_http_status(200)
end
it 'creates a scheduled status' do
expect { subject }.to change { account.scheduled_statuses.count }.from(0).to(1)
end
context 'when the scheduling time is less than 5 minutes' do
let(:params) { { status: 'Hello world', scheduled_at: 4.minutes.from_now } }
it 'does not create a scheduled status', :aggregate_failures do
subject
expect(response).to have_http_status(422)
expect(account.scheduled_statuses).to be_empty
end
end
end
end
describe 'DELETE /api/v1/statuses/:id' do

View file

@ -58,6 +58,7 @@ RSpec.describe 'Notifications' do
expect(response).to have_http_status(200)
expect(body_json_types.uniq).to eq ['mention']
expect(body_as_json[0][:page_min_id]).to_not be_nil
end
end