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:
committed by
Steve Yegge
parent
b1a5241430
commit
29039ed69d
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user