(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func 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 | } |
nothing calls this directly
no test coverage detected