ultisuite-backend/internal/authentik/provision_test.go
2026-06-04 00:12:11 +02:00

23 lines
482 B
Go

package authentik
import "testing"
func TestJoinRedirectURIsDedupes(t *testing.T) {
got := joinRedirectURIs([]string{
"http://localhost/a",
"http://localhost/a",
"http://localhost/b",
})
want := "http://localhost/a\nhttp://localhost/b"
if got != want {
t.Fatalf("got %q want %q", got, want)
}
}
func TestUniqueURIs(t *testing.T) {
uris := uniqueURIs("", "http://a", "http://a", "http://b")
if len(uris) != 2 {
t.Fatalf("expected 2 uris, got %d", len(uris))
}
}