|
1 | | -import type { UserJSON } from '@clerk/shared/types'; |
| 1 | +import type { EnterpriseConnectionJSON, UserJSON } from '@clerk/shared/types'; |
2 | 2 | import { describe, expect, it, vi } from 'vitest'; |
3 | 3 |
|
4 | 4 | import { BaseResource } from '../internal'; |
@@ -80,22 +80,37 @@ describe('User', () => { |
80 | 80 | }); |
81 | 81 |
|
82 | 82 | it('fetches enterprise connections', async () => { |
83 | | - const enterpriseConnectionsJSON = [ |
| 83 | + const enterpriseConnectionsJSON: EnterpriseConnectionJSON[] = [ |
84 | 84 | { |
85 | 85 | id: 'ec_123', |
86 | | - object: 'enterprise_account_connection', |
| 86 | + object: 'enterprise_connection', |
87 | 87 | name: 'Acme Corp SSO', |
88 | 88 | active: true, |
89 | 89 | allow_organization_account_linking: true, |
90 | | - domain: 'acme.com', |
91 | | - protocol: 'saml', |
92 | 90 | provider: 'saml_okta', |
93 | 91 | logo_public_url: null, |
| 92 | + domains: ['acme.com'], |
| 93 | + organization_id: null, |
94 | 94 | sync_user_attributes: true, |
95 | | - allow_subdomains: false, |
96 | | - allow_idp_initiated: false, |
97 | 95 | disable_additional_identifications: false, |
98 | | - enterprise_connection_id: 'ec_123', |
| 96 | + custom_attributes: [], |
| 97 | + oauth_config: null, |
| 98 | + saml_connection: { |
| 99 | + id: 'saml_123', |
| 100 | + name: 'Acme Corp SSO', |
| 101 | + active: true, |
| 102 | + idp_entity_id: 'https://idp.acme.com/entity', |
| 103 | + idp_sso_url: 'https://idp.acme.com/sso', |
| 104 | + idp_certificate: 'MIICertificatePlaceholder', |
| 105 | + idp_metadata_url: 'https://idp.acme.com/metadata', |
| 106 | + idp_metadata: '', |
| 107 | + acs_url: 'https://clerk.example.com/v1/saml/acs', |
| 108 | + sp_entity_id: 'https://clerk.example.com', |
| 109 | + sp_metadata_url: 'https://clerk.example.com/v1/saml/metadata', |
| 110 | + allow_subdomains: false, |
| 111 | + allow_idp_initiated: false, |
| 112 | + force_authn: false, |
| 113 | + }, |
99 | 114 | created_at: 1234567890, |
100 | 115 | updated_at: 1234567890, |
101 | 116 | }, |
|
0 commit comments