MyCrypto/spec/sagas/transaction/reset.spec.ts
HenryNguyen5 12d29e5b94 RC Bugfixes (#1644)
* Fix #1569

* Use common component for handling "to" address

* If to address becomes invalid, hide contract interact explorer

* Add IS_CONTRACT_INTERACTION mode - fix bugs related to contract interact

* Bump shepherd version to fix bugs related to metamask + network switches

* Update mycrypto link downloads

* Update facebook link

* Remove console log from checktx

* Fix dollar sign on contract address in conf modal

* Fix unchecksummed address for metamask signing

* Cleanup unused classname

* Update generate keystore file description to be correct

* Add space to create new wallet banner

* Remove extra variable

* Do checksumming in library function instead of component

* Clear state on address change
2018-04-23 18:35:24 -05:00

22 lines
729 B
TypeScript

import { put, select } from 'redux-saga/effects';
import { resetTransactionSuccessful } from 'actions/transaction';
import { resetTransactionState } from 'sagas/transaction/reset';
import { isContractInteraction } from 'selectors/transaction';
describe('resetTransactionState*', () => {
const gen = resetTransactionState();
it('should check if this is a contract interaction tab', () => {
expect(gen.next().value).toEqual(select(isContractInteraction));
});
it('should put resetActionCreator', () => {
expect(gen.next(false).value).toEqual(
put(resetTransactionSuccessful({ isContractInteraction: false }))
);
});
it('should be done', () => {
expect(gen.next().done).toEqual(true);
});
});