This commit is contained in:
Philipp Heckel 2022-07-08 10:16:23 -04:00
parent 10a9aca2a1
commit 88a77cb132

View file

@ -66,6 +66,8 @@ func TestServer_PublishWithFirebase(t *testing.T) {
msg1 := toMessage(t, response.Body.String()) msg1 := toMessage(t, response.Body.String())
require.NotEmpty(t, msg1.ID) require.NotEmpty(t, msg1.ID)
require.Equal(t, "my first message", msg1.Message) require.Equal(t, "my first message", msg1.Message)
time.Sleep(100 * time.Millisecond) // Firebase publishing happens
require.Equal(t, 1, len(sender.Messages())) require.Equal(t, 1, len(sender.Messages()))
require.Equal(t, "my first message", sender.Messages()[0].Data["message"]) require.Equal(t, "my first message", sender.Messages()[0].Data["message"])
require.Equal(t, "my first message", sender.Messages()[0].APNS.Payload.Aps.Alert.Body) require.Equal(t, "my first message", sender.Messages()[0].APNS.Payload.Aps.Alert.Body)