diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-10 19:44:15 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-12 18:50:38 +0800 |
commit | f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1 (patch) | |
tree | 98ff3c9137cdce1a44b65dc7dc89a7a72f70b9de /packages/metacoin/test/metacoin_test.ts | |
parent | ed0c64fdcf5c180107f54ad916c11c4901a4c01c (diff) | |
download | dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.gz dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.bz2 dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.lz dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.xz dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.zst dexon-sol-tools-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.zip |
Revert "Merge pull request #493 from hysz/features/deployer/multipleCodebaseSupport"
This reverts commit 70d403e6f8c56bc70e6d3471a770b9bbff5d72e7, reversing
changes made to 073bf738ddb271b6b4158798baf4cac3cb0608e9.
Diffstat (limited to 'packages/metacoin/test/metacoin_test.ts')
-rw-r--r-- | packages/metacoin/test/metacoin_test.ts | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts index 51830d1ef..73537d342 100644 --- a/packages/metacoin/test/metacoin_test.ts +++ b/packages/metacoin/test/metacoin_test.ts @@ -36,12 +36,12 @@ describe('Metacoin', () => { }); }); describe('#transfer', () => { - it(`should successfully transfer tokens (via transfer1)`, async () => { + it(`should successfully transfer tokens`, async () => { const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; const amount = INITIAL_BALANCE.div(2); const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); expect(oldBalance).to.be.bignumber.equal(0); - const txHash = await metacoin.transfer1.sendTransactionAsync( + const txHash = await metacoin.transfer.sendTransactionAsync( { to: ZERO_ADDRESS, amount, @@ -58,57 +58,5 @@ describe('Metacoin', () => { const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); expect(newBalance).to.be.bignumber.equal(amount); }); - - it(`should successfully transfer tokens (via transfer2)`, async () => { - const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; - const amount = INITIAL_BALANCE.div(2); - const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); - expect(oldBalance).to.be.bignumber.equal(0); - const callback = 59; - const txHash = await metacoin.transfer2.sendTransactionAsync( - { - to: ZERO_ADDRESS, - amount, - }, - callback, - { from: devConstants.TESTRPC_FIRST_ADDRESS }, - ); - const txReceipt = await web3Wrapper.awaitTransactionMinedAsync(txHash); - const transferLogs = txReceipt.logs[0] as LogWithDecodedArgs<TransferContractEventArgs>; - expect(transferLogs.args).to.be.deep.equal({ - _to: ZERO_ADDRESS, - _from: devConstants.TESTRPC_FIRST_ADDRESS, - _value: amount, - }); - const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); - expect(newBalance).to.be.bignumber.equal(amount); - }); - - it(`should successfully transfer tokens (via transfer3)`, async () => { - const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; - const amount = INITIAL_BALANCE.div(2); - const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); - expect(oldBalance).to.be.bignumber.equal(0); - const callback = 59; - const txHash = await metacoin.transfer3.sendTransactionAsync( - { - transferData: { - to: ZERO_ADDRESS, - amount, - }, - callback, - }, - { from: devConstants.TESTRPC_FIRST_ADDRESS }, - ); - const txReceipt = await web3Wrapper.awaitTransactionMinedAsync(txHash); - const transferLogs = txReceipt.logs[0] as LogWithDecodedArgs<TransferContractEventArgs>; - expect(transferLogs.args).to.be.deep.equal({ - _to: ZERO_ADDRESS, - _from: devConstants.TESTRPC_FIRST_ADDRESS, - _value: amount, - }); - const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS); - expect(newBalance).to.be.bignumber.equal(amount); - }); }); }); |