You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/builder/azure/common/client/normalize_location_test.go

23 lines
508 B

package client
import "testing"
func TestNormalizeLocation(t *testing.T) {
tests := []struct {
name string
loc string
want string
}{
{"removes spaces", " with spaces ", "withspaces"},
{"makes lowercase", "MiXed Case", "mixedcase"},
{"North East US", "North East US", "northeastus"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := NormalizeLocation(tt.loc); got != tt.want {
t.Errorf("NormalizeLocation() = %v, want %v", got, tt.want)
}
})
}
}