Skip to content

Commit

Permalink
fix(iam): removes gitPoaps 15 day test
Browse files Browse the repository at this point in the history
  • Loading branch information
gdixon committed Sep 7, 2022
1 parent 5282507 commit a81d8c5
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions iam/__tests__/gitpoap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,6 @@ const validResponse: { data: GitPOAP[] } = {
],
};

const invalidResponse: { data: GitPOAP[] } = {
data: [
{
gitPoapId: 3261,
name: "GitPOAP: 2022 Test Contributor",
year: 2022,
description: "A description",
repositories: ["gitpoap/gitpoap-hackathon-devconnect-2022"],
earnedAt: "2022-05-18",
/* set date to today (invalid) */
mintedAt: today,
},
],
};

const emptyResponse: { data: GitPOAP[] } = {
data: [],
};
Expand Down Expand Up @@ -89,27 +74,6 @@ describe("Attempt verification", () => {
});
});

it("should return invalid if the user doesn't have any GitPOAPs within the expected time range", async () => {
mockedAxios.get.mockImplementation(async (url) => {
if (url.includes(MOCK_ADDRESS)) {
return invalidResponse;
}
return invalidResponse;
});

const gitpoap = new GitPOAPProvider();
const verifiedPayload = await gitpoap.verify({
address: MOCK_ADDRESS,
} as RequestPayload);

expect(verifiedPayload).toEqual({
valid: false,
record: {
gitpoaps: undefined,
},
});
});

it("should return invalid if the user doesn't have any GitPOAPs", async () => {
mockedAxios.get.mockImplementation(async (url) => {
if (url.includes(MOCK_ADDRESS)) {
Expand Down

0 comments on commit a81d8c5

Please sign in to comment.