From 2d45e397a703d482d1121ddc7ccfac93fa9181db Mon Sep 17 00:00:00 2001 From: nimbleghost <132819643+nimbleghost@users.noreply.github.com> Date: Sat, 17 Jun 2023 21:40:08 +0200 Subject: [PATCH] Add disabled web push test --- server/server_webpush_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/server_webpush_test.go b/server/server_webpush_test.go index d6b4535d..72cd9f30 100644 --- a/server/server_webpush_test.go +++ b/server/server_webpush_test.go @@ -20,6 +20,13 @@ const ( testWebPushEndpoint = "https://updates.push.services.mozilla.com/wpush/v1/AAABBCCCDDEEEFFF" ) +func TestServer_WebPush_Disabled(t *testing.T) { + s := newTestServer(t, newTestConfig(t)) + + response := request(t, s, "POST", "/v1/webpush", payloadForTopics(t, []string{"test-topic"}, testWebPushEndpoint), nil) + require.Equal(t, 404, response.Code) +} + func TestServer_WebPush_TopicAdd(t *testing.T) { s := newTestServer(t, newTestConfigWithWebPush(t))