-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from reapit/task/cld-363-fix-behaviour-update-…
…status [CLD-363] Fix close modal update status success
- Loading branch information
Showing
3 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/components/ui/modal/__tests__/__snapshots__/update-status-success.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
src/components/ui/modal/__tests__/update-status-success.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import { UpdateStatusSuccess } from '../update-status-success' | ||
import { UpdateStatusSuccess, mapDispatchToProps } from '../update-status-success' | ||
import { History } from 'history' | ||
|
||
describe('UpdateStatus', () => { | ||
describe('UpdateStatusSuccess', () => { | ||
it('should match snapshot', () => { | ||
const mockProps = { | ||
hideModal: jest.fn(), | ||
history: {} as History | ||
} | ||
const wrapper = shallow(<UpdateStatusSuccess {...mockProps} />) | ||
expect(wrapper).toMatchSnapshot() | ||
}) | ||
|
||
describe('mapDispatchToProps', () => { | ||
it('hideModal', () => { | ||
const mockDispatch = jest.fn() | ||
const { hideModal } = mapDispatchToProps(mockDispatch) | ||
hideModal() | ||
expect(mockDispatch).toBeCalled() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters