-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
Cuong Vu
authored
Jul 17, 2020
1 parent
c2556cf
commit e673810
Showing
14 changed files
with
93 additions
and
79 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ jest.mock('react-redux', () => ({ | |
describe('onSubmit', () => { | ||
it('onSubmit should run correctly', () => { | ||
const dispatch = jest.fn() | ||
const setIsSubmittedDebit = jest.fn() | ||
const values: AccountsInformationFormValues = { | ||
hasDirectDebit: 'yes', | ||
hasReapitAccountsRef: 'yes', | ||
|
@@ -37,12 +38,14 @@ describe('onSubmit', () => { | |
billingKeyContact: 'name', | ||
billingEmail: '[email protected]', | ||
} | ||
onSubmit(dispatch)(values) | ||
onSubmit({ dispatch, setIsSubmittedDebit })(values) | ||
expect(dispatch).toHaveBeenCalledWith(updateDeveloperData(expectedData)) | ||
expect(setIsSubmittedDebit).toHaveBeenCalledWith(false) | ||
}) | ||
|
||
it('onSubmit should run correctly when hasReapitAccountsRef is no', () => { | ||
const dispatch = jest.fn() | ||
const setIsSubmittedDebit = jest.fn() | ||
const values: AccountsInformationFormValues = { | ||
hasDirectDebit: 'yes', | ||
hasReapitAccountsRef: 'no', | ||
|
@@ -59,7 +62,7 @@ describe('onSubmit', () => { | |
billingKeyContact: 'name', | ||
billingEmail: '[email protected]', | ||
} | ||
onSubmit(dispatch)(values) | ||
onSubmit({ dispatch, setIsSubmittedDebit })(values) | ||
expect(dispatch).toHaveBeenCalledWith(updateDeveloperData(expectedData)) | ||
}) | ||
}) | ||
|
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
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.