Skip to content

Commit

Permalink
bg(tests): fix login tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerocodes authored and Nkemjiks committed Sep 5, 2019
1 parent 84ecce8 commit 814b452
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/LoginForm/LoginForm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
emailState, passwordState, errorState, isLoadingState,
} from '../../hooks/Login';

const { BASE_PATH } = appConfig;
const { BACKEND_PATH } = appConfig;

configure({ adapter: new Adapter() });

Expand Down Expand Up @@ -74,7 +74,7 @@ describe('TEST API CALLS RESPONSE', () => {
it('should return 200 and update localStorage', () => {
const mock = new MockAdapter(axios);
const mockData = { data: { user: { token: 'test' } } };
const url = `${BASE_PATH}/auth/login`;
const url = `${BACKEND_PATH}/auth/login`;
mock.onPost(url).reply(200, mockData);

const mockFunc = jest.fn;
Expand All @@ -87,7 +87,7 @@ describe('TEST API CALLS RESPONSE', () => {
it('should return 401 and update localStorage', () => {
const mock = new MockAdapter(axios);
const mockData = { data: { error: 'error' }, status: 401 };
const url = `${BASE_PATH}/auth/login`;
const url = `${BACKEND_PATH}/auth/login`;
mock.onPost(url).reply(401, mockData);
const mockFunc = jest.fn;

Expand Down

0 comments on commit 814b452

Please sign in to comment.