Skip to content

Commit

Permalink
Add coverage for api/v1/push/subscriptions#show action (mastodon#33134
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mjankowski authored Dec 2, 2024
1 parent de37bc7 commit 752d49e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/requests/api/v1/push/subscriptions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,23 @@
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 }

Expand Down

0 comments on commit 752d49e

Please sign in to comment.