(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestDeleteMessage(t *testing.T) { |
| 90 | cmd := test.GetRootCmdWithSubCommands(NewCmds()...) |
| 91 | ch := test.InitChannel(t) |
| 92 | u := test.CreateUser() |
| 93 | m := test.CreateMessage(ch, u) |
| 94 | t.Cleanup(func() { |
| 95 | test.DeleteMessage(m) |
| 96 | test.DeleteUser(u) |
| 97 | test.DeleteChannel(ch) |
| 98 | }) |
| 99 | |
| 100 | cmd.SetArgs([]string{"delete-message", m}) |
| 101 | _, err := cmd.ExecuteC() |
| 102 | require.NoError(t, err) |
| 103 | require.Contains(t, cmd.OutOrStdout().(*bytes.Buffer).String(), "Message successfully deleted") |
| 104 | } |
| 105 | |
| 106 | func TestPartialUpdateMessage(t *testing.T) { |
| 107 | cmd := test.GetRootCmdWithSubCommands(NewCmds()...) |
nothing calls this directly
no test coverage detected