MCPcopy Create free account
hub / github.com/GetStream/stream-cli / TestPushTest

Function TestPushTest

pkg/cmd/chat/push/push_test.go:12–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestPushTest(t *testing.T) {
13 cmd := test.GetRootCmdWithSubCommands(NewCmds()...)
14 ch := test.InitChannel(t)
15 u := test.CreateUser()
16 msgID := test.CreateMessage(ch, u)
17 t.Cleanup(func() {
18 test.DeleteMessage(msgID)
19 test.DeleteChannel(ch)
20 test.DeleteUser(u)
21 })
22
23 cmd.SetArgs([]string{"test-push", "--message-id", msgID, "--user-id", u, "--skip-devices", "true"})
24 _, err := cmd.ExecuteC()
25 require.NoError(t, err)
26 require.Contains(t, cmd.OutOrStdout().(*bytes.Buffer).String(), msgID)
27}

Callers

nothing calls this directly

Calls 9

InitChannelFunction · 0.92
CreateUserFunction · 0.92
CreateMessageFunction · 0.92
DeleteMessageFunction · 0.92
DeleteChannelFunction · 0.92
DeleteUserFunction · 0.92
StringMethod · 0.80
NewCmdsFunction · 0.70

Tested by

no test coverage detected