Some checks failed
release-tag / Resolve release metadata (push) Successful in 30s
release-tag / Build knowledge (push) Failing after 4m51s
release-tag / Build control (push) Failing after 5m0s
release-tag / Build agent (push) Failing after 5m0s
release-tag / Build agent-data-init (push) Failing after 5m5s
release-tag / Build neuroforge-worker (push) Failing after 5m7s
release-tag / Build neuroforge (push) Failing after 5m9s
14 lines
447 B
Go
14 lines
447 B
Go
package model
|
|
|
|
import "testing"
|
|
|
|
func TestNormalizeReasonCodes(t *testing.T) {
|
|
got := NormalizeReasonCodes([]string{" insufficient_information ", "INSUFFICIENT_INFORMATION", "", "site_affected"})
|
|
if len(got) != 2 || got[0] != "insufficient_information" || got[1] != "site_affected" {
|
|
t.Fatalf("unexpected normalized codes: %#v", got)
|
|
}
|
|
if !HasReasonCode(got, " Insufficient_Information ") {
|
|
t.Fatal("expected case-insensitive match")
|
|
}
|
|
}
|