Fakultas Ilmu Komputer UI

Commit 3c586268 authored by hilyafesmia's avatar hilyafesmia
Browse files

Menambah test untuk fungsi handleSelectChange

parent 9b7491ab
Pipeline #26847 passed with stages
in 7 minutes and 52 seconds
import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import CompanyRegisterModal from '../../components/CompanyRegisterModal';
import ReactDOM from 'react-dom';
import CompanyRegisterModal from '../../components/CompanyRegisterModal';
describe('CompanyRegisterModal', () => {
let container;
......@@ -70,4 +71,13 @@ describe('CompanyRegisterModal', () => {
expect(modal.state.email).to.equal('kape@kape.com');
});
it('handle handleSelectChange without problem', () => {
const modal = ReactTestUtils.renderIntoDocument(
<CompanyRegisterModal/>
);
modal.handleSelectChange({}, { name: 'category', value: 'kape@kape.com' });
expect(modal.state.category).to.equal('kape@kape.com');
});
})
\ No newline at end of file
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