Files
archie/internal/daemon/daemon_test.go
T

18 lines
507 B
Go

package daemon
import "testing"
func TestHasLabelUsesExactNames(t *testing.T) {
labels := []string{"bug", "archie:parked-old", "feature", "custom,label"}
if hasLabel(labels, "archie:parked") {
t.Fatal("hasLabel matched a label-name substring")
}
if !hasLabel(labels, "custom,label") {
t.Fatal("hasLabel did not preserve a label containing a comma")
}
labels = append(labels, "archie:parked")
if !hasLabel(labels, "archie:parked") {
t.Fatal("hasLabel did not match the exact label name")
}
}