@@ -13,7 +13,7 @@ import { mockAuth, mockUseMutationResult, mockUseQueryResult } from '../../test-
1313import { exampleProject1 } from '../../test-support/test-data/projects.stub' ;
1414import { ToastProvider } from '../../../components/Toast/ToastProvider' ;
1515import * as authHooks from '../../../hooks/auth.hooks' ;
16- import { useAllUsers , useLogUserIn } from '../../../hooks/users.hooks' ;
16+ import { useAllMembers , useLogUserIn } from '../../../hooks/users.hooks' ;
1717import * as userHooks from '../../../hooks/users.hooks' ;
1818import {
1919 mockLogUserInReturnValue ,
@@ -30,9 +30,9 @@ const mockSingleProjectHook = (isLoading: boolean, isError: boolean, data?: Proj
3030 mockedUseSingleProject . mockReturnValue ( mockUseQueryResult < Project > ( isLoading , isError , data , error ) ) ;
3131} ;
3232
33- const mockedUseAllUsers = useAllUsers as jest . Mock < UseQueryResult < User [ ] > > ;
34- const mockAllUsersHook = ( isLoading : boolean , isError : boolean , data ?: User [ ] , error ?: Error ) => {
35- mockedUseAllUsers . mockReturnValue ( mockUseQueryResult < User [ ] > ( isLoading , isError , data , error ) ) ;
33+ const mockedUseAllMembers = useAllMembers as jest . Mock < UseQueryResult < User [ ] > > ;
34+ const mockAllMembersHook = ( isLoading : boolean , isError : boolean , data ?: User [ ] , error ?: Error ) => {
35+ mockedUseAllMembers . mockReturnValue ( mockUseQueryResult < User [ ] > ( isLoading , isError , data , error ) ) ;
3636} ;
3737
3838const mockedUseLogUserIn = useLogUserIn as jest . Mock < UseMutationResult > ;
@@ -74,7 +74,7 @@ describe('Implement change request permission tests', () => {
7474
7575 it ( 'Implementation actions disabled when not allowed' , ( ) => {
7676 mockSingleProjectHook ( false , false , exampleProject1 ) ;
77- mockAllUsersHook ( false , false , [ ] ) ;
77+ mockAllMembersHook ( false , false , [ ] ) ;
7878 mockUseLogUserInHook ( false , false ) ;
7979 renderComponent ( exampleStandardChangeRequest ) ;
8080 fireEvent . click ( screen . getByText ( actionBtnText ) ) ;
@@ -84,7 +84,7 @@ describe('Implement change request permission tests', () => {
8484
8585 it ( 'Implementation actions enabled when allowed' , ( ) => {
8686 mockSingleProjectHook ( false , false , exampleProject1 ) ;
87- mockAllUsersHook ( false , false , [ ] ) ;
87+ mockAllMembersHook ( false , false , [ ] ) ;
8888 mockUseLogUserInHook ( false , false ) ;
8989 renderComponent ( exampleStandardChangeRequest , true ) ;
9090 fireEvent . click ( screen . getByText ( actionBtnText ) ) ;
0 commit comments