Browse Source

Fix tests

binwiederhier 9 months ago
parent
commit
1598087e1f
2 changed files with 17 additions and 7 deletions
  1. 2 1
      docs/releases.md
  2. 15 6
      server/server_firebase_test.go

+ 2 - 1
docs/releases.md

@@ -1379,6 +1379,7 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
 
 * Add username/password auth to email publishing ([#1164](https://github.com/binwiederhier/ntfy/pull/1164), thanks to [@bishtawi](https://github.com/bishtawi) for implementing)
 * Write VAPID keys to file in `ntfy webpush --output-file` ([#1138](https://github.com/binwiederhier/ntfy/pull/1138), thanks to [@nogweii](https://github.com/nogweii) for implementing)
+* Add Docker major/minor version to image tags ([#1271](https://github.com/binwiederhier/ntfy/pull/1271), thanks to [@RoboMagus](https://github.com/RoboMagus))
 
 **Bug fixes + maintenance:**
 
@@ -1389,7 +1390,7 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
 * Make sure UnifiedPush messages are not treated as attachments ([#1312](https://github.com/binwiederhier/ntfy/pull/1312), thanks to [@vkrause](https://github.com/vkrause))
 * Add OCI image version to Docker image ([#1307](https://github.com/binwiederhier/ntfy/pull/1307), thanks to [@jlssmt](https://github.com/jlssmt))
 * WebSocket returning incorrect HTTP error code ([#1338](https://github.com/binwiederhier/ntfy/pull/1338) / [#1337](https://github.com/binwiederhier/ntfy/pull/1337), thanks to [@wunter8](https://github.com/wunter8) for debugging and implementing)
-* Make Markdown in web app scrollable horizontally ([#1262](https://github.com/binwiederhier/ntfy/pull/1262), thanks to [@rake5k](https://github.com/rake5k) for fixing)
+* Make Markdown in the web app scrollable horizontally ([#1262](https://github.com/binwiederhier/ntfy/pull/1262), thanks to [@rake5k](https://github.com/rake5k) for fixing)
 
 **Documentation:**
 

+ 15 - 6
server/server_firebase_test.go

@@ -223,13 +223,22 @@ func TestToFirebaseMessage_Message_Normal_Not_Allowed(t *testing.T) {
 	require.Equal(t, &messaging.AndroidConfig{
 		Priority: "high",
 	}, fbm.Android)
-	require.Equal(t, "", fbm.Data["message"])
-	require.Equal(t, "", fbm.Data["priority"])
+	require.Equal(t, "New message", fbm.Data["message"])
+	require.Equal(t, "5", fbm.Data["priority"])
 	require.Equal(t, map[string]string{
-		"id":    m.ID,
-		"time":  fmt.Sprintf("%d", m.Time),
-		"event": "poll_request",
-		"topic": "mytopic",
+		"id":           m.ID,
+		"time":         fmt.Sprintf("%d", m.Time),
+		"event":        "poll_request",
+		"topic":        "mytopic",
+		"message":      "New message",
+		"title":        "",
+		"tags":         "",
+		"click":        "",
+		"icon":         "",
+		"priority":     "5",
+		"encoding":     "",
+		"content_type": "",
+		"poll_id":      m.ID,
 	}, fbm.Data)
 }