Fakultas Ilmu Komputer UI

Commit c6c9c7d4 authored by Kristianto's avatar Kristianto
Browse files

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

parent f9e3542b
......@@ -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