Skip to content

Commit

Permalink
chore: Refactor GetActivityPresenter to include user repository in th…
Browse files Browse the repository at this point in the history
…e constructor
  • Loading branch information
FelipeCarillo committed May 8, 2024
1 parent a87cfe9 commit 152a35b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/modules/get_activity/app/get_activity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ describe("Testing Get Activity Presenter", () => {
const token = await new TokenAuth().generate_token(user_admin.id);

const activity = activityMock.activities[0];
console.log("mock: " + activity.id);

const response = await handler(
{
Expand All @@ -26,11 +25,11 @@ describe("Testing Get Activity Presenter", () => {
null
);

// expect(response.statusCode).toBe(200);
expect(response.statusCode).toBe(200);
expect(JSON.parse(response.body).message).toBe(
"Activity found successfully"
);
expect(JSON.parse(response.body).data.activity.id).toBe(activity.id);
expect(JSON.parse(response.body).data.id).toBe(activity.id);
});

it("should not get activity applicants if user is a student", async () => {
Expand All @@ -53,8 +52,6 @@ describe("Testing Get Activity Presenter", () => {
);

expect(response.statusCode).toBe(200);
console.log(JSON.parse(response.body).data.applicants);
console.log(JSON.parse(response.body).data.id);
expect(JSON.parse(response.body).data.applicants).toEqual([]);
});

Expand Down

0 comments on commit 152a35b

Please sign in to comment.