fix(migrate_agents_test): test actually calls getMigrationStatusIcon

The test was duplicating the icon selection logic in a switch statement
instead of calling the actual function being tested. Extract the icon
logic into getMigrationStatusIcon() and have the test call it directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/george
2026-01-16 12:41:23 -08:00
committed by Steve Yegge
parent b1a5241430
commit 29039ed69d
2 changed files with 13 additions and 17 deletions

View File

@@ -56,17 +56,9 @@ func TestMigrationResultStatus(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var icon string
switch tt.result.Status {
case "migrated", "would migrate":
icon = " ✓"
case "skipped":
icon = " ⊘"
case "error":
icon = " ✗"
}
icon := getMigrationStatusIcon(tt.result.Status)
if icon != tt.wantIcon {
t.Errorf("icon for status %q = %q, want %q", tt.result.Status, icon, tt.wantIcon)
t.Errorf("getMigrationStatusIcon(%q) = %q, want %q", tt.result.Status, icon, tt.wantIcon)
}
})
}