From 9a03902ab602fe49ea8bfbc56cdbed0831e5963f Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 20 Sep 2024 04:16:19 -0400 Subject: [PATCH] Capture actual behavior in v2/notifications "someone else" dismiss scenario (#31985) --- spec/requests/api/v2/notifications_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/requests/api/v2/notifications_spec.rb b/spec/requests/api/v2/notifications_spec.rb index edf333ecd8..9522a39e0f 100644 --- a/spec/requests/api/v2/notifications_spec.rb +++ b/spec/requests/api/v2/notifications_spec.rb @@ -312,12 +312,15 @@ RSpec.describe 'Notifications' do end context 'when notification belongs to someone else' do - let(:notification) { Fabricate(:notification) } + let(:notification) { Fabricate(:notification, group_key: 'foobar') } - it 'returns http not found' do - subject + it 'leaves the notification alone' do + expect { subject } + .to_not change(Notification, :count) - expect(response).to have_http_status(404) + expect(response).to have_http_status(200) + expect(response.content_type) + .to start_with('application/json') end end end