(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func Test_runUpdateCmd_dryRunJSON(t *testing.T) { |
| 121 | r := httpmock.Registry{} |
| 122 | f, out := test.NewFactory(false, &r, nil, `{"objectID":"foo"}`) |
| 123 | cmd := NewUpdateCmd(f, nil) |
| 124 | |
| 125 | out, err := test.Execute(cmd, "foo -F - --dry-run --output json", out) |
| 126 | if err != nil { |
| 127 | t.Fatal(err) |
| 128 | } |
| 129 | |
| 130 | assert.Contains(t, out.String(), `"action":"update_objects"`) |
| 131 | assert.Contains(t, out.String(), `"objectCount":1`) |
| 132 | assert.Contains(t, out.String(), `"dryRun":true`) |
| 133 | } |
nothing calls this directly
no test coverage detected