MCPcopy
hub / github.com/sideshow/apns2 / TestAlertTitle

Function TestAlertTitle

payload/builder_test.go:84–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestAlertTitle(t *testing.T) {
85 payload := NewPayload().AlertTitle("hello")
86 b, _ := json.Marshal(payload)
87 assert.Equal(t, `{"aps":{"alert":{"title":"hello"}}}`, string(b))
88}
89
90func TestAlertTitleLocKey(t *testing.T) {
91 payload := NewPayload().AlertTitleLocKey("GAME_PLAY_REQUEST_FORMAT")

Callers

nothing calls this directly

Calls 2

NewPayloadFunction · 0.85
AlertTitleMethod · 0.80

Tested by

no test coverage detected