Skip to content
Snippets Groups Projects
Select Git revision
  • 9fc0b76dd8d29120b77ace11a63cfad44a0c9b73
  • main default protected
  • v1.298.0
  • v1.297.0
  • v1.296.0
  • v1.295.0
  • v1.294.0
  • v1.293.0
  • v1.292.0
  • v1.291.0
  • v1.290.0
  • v1.289.0
  • v1.288.0
  • v1.287.0
  • v1.286.0
  • v1.285.0
  • v1.284.0
  • v1.283.0
  • v1.282.0
  • v1.281.0
  • v1.280.0
  • v1.279.0
22 results

address_utils_test.go

Blame
  • 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)
    			}
    		})
    	}
    }