(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func TestPartialUpdateMessage(t *testing.T) { |
| 107 | cmd := test.GetRootCmdWithSubCommands(NewCmds()...) |
| 108 | ch := test.InitChannel(t) |
| 109 | u := test.CreateUser() |
| 110 | m := test.CreateMessage(ch, u) |
| 111 | t.Cleanup(func() { |
| 112 | test.DeleteMessage(m) |
| 113 | test.DeleteUser(u) |
| 114 | test.DeleteChannel(ch) |
| 115 | }) |
| 116 | |
| 117 | cmd.SetArgs([]string{"update-message-partial", "-m", m, "--user", u, "--set", `{"age":15}`}) |
| 118 | _, err := cmd.ExecuteC() |
| 119 | require.NoError(t, err) |
| 120 | require.Contains(t, cmd.OutOrStdout().(*bytes.Buffer).String(), "Successfully updated message") |
| 121 | } |
| 122 | |
| 123 | func TestFlagMessage(t *testing.T) { |
| 124 | cmd := test.GetRootCmdWithSubCommands(NewCmds()...) |
nothing calls this directly
no test coverage detected