1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-04 04:08:02 +02:00

Move web-push-config endpoint to config.js

This commit is contained in:
binwiederhier 2023-05-30 14:42:17 -04:00 committed by nimbleghost
parent 9e0687e142
commit e8139ad655
7 changed files with 11 additions and 57 deletions

View file

@ -1,7 +1,6 @@
package server
import (
"fmt"
"io"
"net/http"
"net/http/httptest"
@ -27,14 +26,6 @@ var (
}`
)
func TestServer_WebPush_GetConfig(t *testing.T) {
s := newTestServer(t, newTestConfigWithWebPush(t))
response := request(t, s, "GET", "/v1/web-push-config", "", nil)
require.Equal(t, 200, response.Code)
require.Equal(t, fmt.Sprintf(`{"public_key":"%s"}`, s.config.WebPushPublicKey)+"\n", response.Body.String())
}
func TestServer_WebPush_TopicSubscribe(t *testing.T) {
s := newTestServer(t, newTestConfigWithWebPush(t))