test: Updated router unit tests.

Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
Marley Powell
2021-12-16 15:24:54 +00:00
parent 17da4e34c3
commit 30d3623bf1
@@ -49,6 +49,8 @@ describe('createRouter', () => {
getPullRequests: jest.fn(),
getBuilds: jest.fn(),
getBuildRuns: jest.fn(),
getAllTeams: jest.fn().mockReturnValue([]),
getTeamMembers: jest.fn(),
} as any;
const router = await createRouter({
azureDevOpsApi,
@@ -406,4 +408,11 @@ describe('createRouter', () => {
});
});
});
describe('GET /users/:userId/team-ids', () => {
it('fetches a a list of teams', async () => {
const response = await request(app).get('/users/user1/team-ids');
expect(response.status).toEqual(200);
});
});
});