Fix Web Push subscription deletion endpoint incorrectly expecting anti-CSRF tokens (#39918)
This commit is contained in:
1 parent
9d51f51cc0
commit
5f5dfd7823
2 files changed
+11
No files matched your search
@@ -39,6 +39,15 @@ RSpec.describe 'API Web Push Subscriptions' do
|
||||
describe 'DELETE /api/web/push_subscriptions/:id' do
|
||||
subject { delete api_web_push_subscription_path(token) }
|
||||
|
||||
around do |example|
|
||||
old = ActionController::Base.allow_forgery_protection
|
||||
ActionController::Base.allow_forgery_protection = true
|
||||
|
||||
example.run
|
||||
|
||||
ActionController::Base.allow_forgery_protection = old
|
||||
end
|
||||
|
||||
context 'when the subscription exists' do
|
||||
let!(:web_push_subscription) do
|
||||
Fabricate(:web_push_subscription)
|
||||
|
||||
Reference in new issue
Block a user