feat: update smoke profile area handling
This commit is contained in:
@@ -106,3 +106,23 @@ func TestIsSmokeProfileCompleted(t *testing.T) {
|
||||
t.Fatalf("isSmokeProfileCompleted: expected false when quit_motivations missing")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizedSmokeMode(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
cases := []struct {
|
||||
in string
|
||||
want string
|
||||
}{
|
||||
{in: SmokeModeQuit, want: SmokeModeQuit},
|
||||
{in: SmokeModeRecord, want: SmokeModeRecord},
|
||||
{in: "", want: SmokeModeRecord},
|
||||
{in: "unknown", want: SmokeModeRecord},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
if got := normalizedSmokeMode(c.in); got != c.want {
|
||||
t.Fatalf("normalizedSmokeMode(%q): got %q, want %q", c.in, got, c.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user