Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #9 from reactioncommerce/feat-kieckhafer-newAuthSe…
Browse files Browse the repository at this point in the history
…rviceMockNames

feat: updated mockContext for new auth service
  • Loading branch information
kieckhafer authored Dec 4, 2019
2 parents f2669e6 + 7612727 commit d7d9e22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tests/mockContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const mockContext = {
emit() { },
on() { }
},
validatePermissions: jest.fn().mockName("validatePermissions"),
collections: {},
getAbsoluteUrl: jest.fn().mockName("getAbsoluteUrl").mockImplementation((path) => {
const adjustedPath = path[0] === "/" ? path : `/${path}`;
Expand All @@ -16,6 +15,9 @@ const mockContext = {
mutations: {},
queries: {},
userHasPermission: jest.fn().mockName("userHasPermission"),
userHasPermissionLegacy: jest.fn().mockName("userHasPermissionLegacy"),
validatePermissions: jest.fn().mockName("validatePermissions"),
validatePermissionsLegacy: jest.fn().mockName("validatePermissionsLegacy"),
userId: "FAKE_USER_ID"
};

Expand Down

0 comments on commit d7d9e22

Please sign in to comment.