From 752d49eefef48262d501ba5fc2006d2c8466a000 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 2 Dec 2024 10:08:41 -0500 Subject: [PATCH] Add coverage for `api/v1/push/subscriptions#show` action (#33134) --- spec/requests/api/v1/push/subscriptions_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/requests/api/v1/push/subscriptions_spec.rb b/spec/requests/api/v1/push/subscriptions_spec.rb index 8ad672c95e..15d469d7a9 100644 --- a/spec/requests/api/v1/push/subscriptions_spec.rb +++ b/spec/requests/api/v1/push/subscriptions_spec.rb @@ -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 }