package authentik import "testing" func TestIsTerminalFlowRedirect(t *testing.T) { t.Parallel() for _, tc := range []struct { to string want bool }{ {"/auth/", true}, {"/auth", true}, {"http://authentik-server:9000/auth/", true}, {"/auth/if/user/", false}, {"/auth/if/flow/default-authentication-flow/", false}, } { if got := isTerminalFlowRedirect(tc.to); got != tc.want { t.Fatalf("isTerminalFlowRedirect(%q) = %v, want %v", tc.to, got, tc.want) } } }