fix(registry): restore protocol routing and test coverage for npm, oci, and api flows
This commit is contained in:
@@ -16,19 +16,23 @@ import {
|
||||
post,
|
||||
put,
|
||||
setupTestDb,
|
||||
startTestServer,
|
||||
stopTestServer,
|
||||
teardownTestDb,
|
||||
} from '../helpers/index.ts';
|
||||
|
||||
describe('Organization API Integration', () => {
|
||||
describe('Organization API Integration', { sanitizeResources: false, sanitizeOps: false }, () => {
|
||||
let accessToken: string;
|
||||
let testUserId: string;
|
||||
|
||||
beforeAll(async () => {
|
||||
await setupTestDb();
|
||||
await startTestServer();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await teardownTestDb();
|
||||
await stopTestServer();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -116,8 +120,8 @@ describe('Organization API Integration', () => {
|
||||
const response = await get('/api/v1/organizations', createAuthHeader(accessToken));
|
||||
|
||||
assertStatus(response, 200);
|
||||
const body = response.body as Record<string, unknown>[];
|
||||
assertEquals(body.length >= 2, true);
|
||||
const body = response.body as { organizations: Record<string, unknown>[] };
|
||||
assertEquals(body.organizations.length >= 2, true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -202,8 +206,8 @@ describe('Organization API Integration', () => {
|
||||
);
|
||||
|
||||
assertStatus(response, 200);
|
||||
const body = response.body as Record<string, unknown>[];
|
||||
assertEquals(body.length >= 1, true); // At least the creator
|
||||
const body = response.body as { members: Record<string, unknown>[] };
|
||||
assertEquals(body.members.length >= 1, true); // At least the creator
|
||||
});
|
||||
|
||||
it('should add member to organization', async () => {
|
||||
|
||||
Reference in New Issue
Block a user