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

Function TestSoundDictionary

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

Source from the content-addressed store, hash-verified

46}
47
48func TestSoundDictionary(t *testing.T) {
49 payload := NewPayload().Sound(map[string]interface{}{
50 "critical": 1,
51 "name": "default",
52 "volume": 0.8,
53 })
54 b, _ := json.Marshal(payload)
55 assert.Equal(t, `{"aps":{"sound":{"critical":1,"name":"default","volume":0.8}}}`, string(b))
56}
57
58func TestContentAvailable(t *testing.T) {
59 payload := NewPayload().ContentAvailable()

Callers

nothing calls this directly

Calls 2

NewPayloadFunction · 0.85
SoundMethod · 0.80

Tested by

no test coverage detected