Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/integration/notifications_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require "test_helper"

class NotificationDeliveryTest < ActiveSupport::TestCase
Comment thread
robzolkos marked this conversation as resolved.
# Use a stable, publicly-routable IP so DNS stubbing satisfies public-host/SSRF
# validation for the FCM endpoint and remains deterministic across runs.
FCM_PUBLIC_TEST_IP = "142.250.185.206"
Comment thread
robzolkos marked this conversation as resolved.
Outdated

setup do
@assigner = users(:david)
@assignee = users(:kevin)
Expand All @@ -16,6 +20,8 @@ class NotificationDeliveryTest < ActiveSupport::TestCase
Notification.register_push_target(:web)
Notification.register_push_target(push_target_with_tracking)

stub_dns_resolution(FCM_PUBLIC_TEST_IP)

# Give assignee a web push subscription
@assignee.push_subscriptions.create!(
endpoint: "https://fcm.googleapis.com/fcm/send/test123",
Expand Down