Fakultas Ilmu Komputer UI

Commit 1b1a2cf3 authored by Kristianto's avatar Kristianto
Browse files

Merge branch '1606889856-206' into 'master'

#206 Add test case to check initial state of ApplicantPage.js

See merge request !234
parents f9e3542b c6c9c7d4
Pipeline #26655 passed with stages
in 23 minutes and 43 seconds
......@@ -3,8 +3,11 @@ import ReactTestUtils from 'react-dom/test-utils';
import fetchMock from 'fetch-mock';
import ApplicantPage from '../ApplicantPage';
import Tabs from '../components/Tabs';
import { shallow, configure } from 'enzyme';
describe('ApplicantPage', () => {
let wrapper;
const companyUser = {
role: 'company',
data: {
......@@ -212,4 +215,11 @@ describe('ApplicantPage', () => {
expect(applicantPage).to.exist;
fetchMock.restore();
});
it('State of selected contains Company User ID', () => {
const wrapper = shallow(<ApplicantPage user={companyUser} />);
expect(wrapper.state().selected).to.equal('/companies/3/applications/');
expect(wrapper.state().refresh).to.equal(0);
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment