open-consul/consul/util_test.go

16 lines
229 B
Go
Raw Normal View History

2013-12-12 19:07:14 +00:00
package consul
import (
"testing"
)
func TestStrContains(t *testing.T) {
l := []string{"a", "b", "c"}
if !strContains(l, "b") {
t.Fatalf("should contain")
}
if strContains(l, "d") {
t.Fatalf("should not contain")
}
}