Fakultas Ilmu Komputer UI

Commit ebcd00ef authored by emil farisan's avatar emil farisan
Browse files

fix errors on test case

parent 0a936882
Pipeline #26735 failed with stages
in 6 minutes and 2 seconds
...@@ -56,7 +56,7 @@ describe('EditProfil', () => { ...@@ -56,7 +56,7 @@ describe('EditProfil', () => {
<EditProfil route={{ own: true, data: studentSession }} user={{ data: studentSession }} params={{ id: 3 }} />); <EditProfil route={{ own: true, data: studentSession }} user={{ data: studentSession }} params={{ id: 3 }} />);
profile.getProfile().then(()=> expect(profile.props.route.own).to.equal(true)); profile.getProfile().then(()=> expect(profile.props.route.own).to.equal(true));
const userData = Storage.getUserData(); const userData = Storage.get('user-data');
expect(response2).to.equal(userData.student); expect(response2).to.equal(userData.student);
fetchMock.restore(); fetchMock.restore();
}); });
...@@ -75,7 +75,7 @@ describe('EditProfil', () => { ...@@ -75,7 +75,7 @@ describe('EditProfil', () => {
const profile = ReactTestUtils.renderIntoDocument( const profile = ReactTestUtils.renderIntoDocument(
<EditProfil route={{ own: true, data: studentSession }} user={{ data: studentSession }} params={{ id: 3 }} />); <EditProfil route={{ own: true, data: studentSession }} user={{ data: studentSession }} params={{ id: 3 }} />);
birthDate = '1996-06-30' const birthDate = '1996-06-30'
parsedDate = profile.parseIndonesianDateFormat(birthDate) parsedDate = profile.parseIndonesianDateFormat(birthDate)
expect(parsedDate).to.equal('30 Juni 1996') expect(parsedDate).to.equal('30 Juni 1996')
fetchMock.restore(); fetchMock.restore();
......
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