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

Commit

Permalink
#650 - updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RChandler234 committed Jun 10, 2022
1 parent 59c61ab commit 92d3b52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '../../../test-support/test-data/change-requests.stub';
import {
exampleAdminUser,
exampleAdminUser2,
exampleGuestUser,
exampleMemberUser
} from '../../../test-support/test-data/users.stub';
Expand Down Expand Up @@ -113,7 +114,7 @@ describe('change request details container', () => {

it('enables review if the user is an admin', () => {
mockSingleCRHook(false, false, exampleActivationChangeRequest);
mockAuthHook(exampleAdminUser);
mockAuthHook(exampleAdminUser2);
renderComponent();

expect(screen.getByText('Review')).not.toBeDisabled();
Expand Down
10 changes: 10 additions & 0 deletions src/test-support/test-data/users.stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ export const exampleAdminUser: User = {
role: Role.ADMIN
};

export const exampleAdminUser2: User = {
userId: 3,
firstName: 'Joe',
lastName: 'Shmoe',
googleAuthId: '2',
email: '[email protected]',
emailId: 'shmoe.j',
role: Role.ADMIN
};

export const exampleLeadershipUser: User = {
userId: 3,
firstName: 'Joe',
Expand Down

0 comments on commit 92d3b52

Please sign in to comment.