Skip to content

Commit fc52d74

Browse files
committed
Added testing
1 parent f0986a3 commit fc52d74

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/pages/Login/Login.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ beforeEach(() => {
4747
jest.spyOn(reactRedux, 'useDispatch').mockImplementation(() => dispatchMock);
4848
jest.spyOn(authActions, 'authFacebook').mockImplementation(jest.fn);
4949
jest.spyOn(authActions, 'authGoogle').mockImplementation(jest.fn);
50+
jest.spyOn(authActions, 'authMicrosoft').mockImplementation(jest.fn);
5051
});
5152

5253
it('should dispatch authFacebook action when the user tries to log in with Facebook', () => {
@@ -72,3 +73,15 @@ it('should dispatch authGoogle action when the user tries to log in with Google'
7273

7374
expect(authActions.authGoogle).toHaveBeenCalled();
7475
});
76+
77+
it('should dispatch authMicrosoft action when the user tries to log in with Microsoft', () => {
78+
const { component } = mountWithProviders(<Login />)({
79+
auth: {
80+
userData: {}
81+
}
82+
});
83+
84+
component.find('#microsoft').simulate('click');
85+
86+
expect(authActions.authMicrosoft).toHaveBeenCalled();
87+
});

0 commit comments

Comments
 (0)