Select Git revision
address_utils_test.go
address_utils_test.go 609 B
package address_utils
import (
"testing"
)
func TestIsProvince(t *testing.T) {
type args struct {
address string
}
tests := []struct {
name string
args args
want bool
}{{
name: "IsProvince",
args: args{address: "North West, South Africa"},
want: true,
}, {
name: "IsNotProvince",
args: args{address: "22 Kruis Street, Potchefstroom, Potchefstroom, 2531, GP, ZA"},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := IsProvince(tt.args.address); got != tt.want {
t.Errorf("IsProvince() = %v, want %v", got, tt.want)
}
})
}
}