package pointwithdrawalconfig

import (
	"reflect"
	"testing"
)

func TestNormalizeCountriesCanonicalizesWhitelist(t *testing.T) {
	got := normalizeCountries([]string{" sa ", "TR", "sa", "", "country-code-that-is-too-long"})
	want := []string{"SA", "TR"}
	if !reflect.DeepEqual(got, want) {
		t.Fatalf("normalizeCountries() = %v, want %v", got, want)
	}
}

func TestNormalizeAppCodeKeepsLegacyDefault(t *testing.T) {
	if got := normalizeAppCode(""); got != "lalu" {
		t.Fatalf("empty app code = %q, want lalu", got)
	}
	if got := normalizeAppCode(" FAMI "); got != "fami" {
		t.Fatalf("Fami app code = %q, want fami", got)
	}
}
