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

This commit is contained in:
KMY 2024-12-03 18:03:14 +09:00
commit 2d9124a3ab
214 changed files with 1763 additions and 3380 deletions

View file

@ -95,7 +95,7 @@ RSpec.describe 'Accounts' do
it 'does not add the account to the list', :aggregate_failures do
subject
expect(response).to have_http_status(404)
expect(response).to have_http_status(422)
expect(response.content_type)
.to start_with('application/json')
expect(list.accounts).to_not include(bob)

View file

@ -135,6 +135,23 @@ RSpec.describe 'API V1 Push Subscriptions' do
end
end
describe 'GET /api/v1/push/subscription' do
subject { get '/api/v1/push/subscription', headers: headers }
before { create_subscription_with_token }
it 'shows subscription details' do
subject
expect(response)
.to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body)
.to include(endpoint: endpoint)
end
end
describe 'DELETE /api/v1/push/subscription' do
subject { delete '/api/v1/push/subscription', headers: headers }