Skip to content

Commit e2d388c

Browse files
committed
fix: update stale test assertions for key-value plaintext format
Three tests in root_test.go still asserted the old `name (key)` bullet format, but the toggle-on command now passes ResourceName: "flags" which triggers key-value output. Update to match the actual output shape. Made-with: Cursor
1 parent 29c1faf commit e2d388c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

cmd/root_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ func TestOutputDefaultsAndOverrides(t *testing.T) {
262262
}
263263
out := execNonTTYCmdGetenv(t, mockClient, getenv)
264264
assert.Contains(t, string(out), "Successfully updated")
265-
assert.Contains(t, string(out), "test-name (test-key)")
265+
assert.Contains(t, string(out), "Key:")
266+
assert.Contains(t, string(out), "test-key")
266267
})
267268

268269
t.Run("FORCE_TTY=1 yields plaintext output when non-TTY", func(t *testing.T) {
@@ -274,7 +275,8 @@ func TestOutputDefaultsAndOverrides(t *testing.T) {
274275
}
275276
out := execNonTTYCmdGetenv(t, mockClient, getenv)
276277
assert.Contains(t, string(out), "Successfully updated")
277-
assert.Contains(t, string(out), "test-name (test-key)")
278+
assert.Contains(t, string(out), "Key:")
279+
assert.Contains(t, string(out), "test-key")
278280
})
279281
}
280282

@@ -333,5 +335,6 @@ func TestConfigOutputPrecedenceNonTTY(t *testing.T) {
333335
out, err := io.ReadAll(b)
334336
require.NoError(t, err)
335337
assert.Contains(t, string(out), "Successfully updated")
336-
assert.Contains(t, string(out), "test-name (test-key)")
338+
assert.Contains(t, string(out), "Key:")
339+
assert.Contains(t, string(out), "test-key")
337340
}

0 commit comments

Comments
 (0)