mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 11:20:42 +01:00
test(repositories): cover heartbeat repository context fixture
Provide repository access and authorization seams in the goal-context route fixture and assert the assigned agent's effective repository payload. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
4dafea4e79
commit
e973924dfb
1 file changed
+10
@@ -131,6 +131,12 @@ vi.mock("../services/index.js", () => ({
|
||||
issueService: () => mockIssueService,
|
||||
logActivity: mockLogActivity,
|
||||
projectService: () => mockProjectService,
|
||||
repositoryAccessService: () => ({
|
||||
listEffectiveRepositories: vi.fn(async () => []),
|
||||
}),
|
||||
authorizationService: () => ({
|
||||
decide: vi.fn(async () => ({ allowed: true })),
|
||||
}),
|
||||
routineService: () => mockRoutineService,
|
||||
workProductService: () => mockWorkProductService,
|
||||
}));
|
||||
@@ -436,6 +442,10 @@ describe.sequential("issue goal context routes", () => {
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body.issue.goalId).toBe(projectGoal.id);
|
||||
expect(res.body.issue.workMode).toBe("planning");
|
||||
expect(res.body.agent).toEqual({
|
||||
id: legacyProjectLinkedIssue.assigneeAgentId,
|
||||
effectiveRepositories: [],
|
||||
});
|
||||
expect(res.body.goal).toEqual(
|
||||
expect.objectContaining({
|
||||
id: projectGoal.id,
|
||||
|
||||
Reference in new issue
Block a user