aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-03 06:43:50 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-03 06:44:03 +0800
commitb58ca99b61e8332afc441a1520759578b754c424 (patch)
tree0165791cafd9eaa65551413521094bad20516cf2 /test/unit
parentab126b8c7894a0cfb8e728eeed48689200ed7a6c (diff)
downloadtangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar.gz
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar.bz2
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar.lz
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar.xz
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.tar.zst
tangerine-wallet-browser-b58ca99b61e8332afc441a1520759578b754c424.zip
tests - fix txController tests so that txMetas have a from feild
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/tx-controller-test.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 712097fce..6bd010e7a 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -162,7 +162,7 @@ describe('Transaction Controller', function () {
describe('#addUnapprovedTransaction', function () {
it('should add an unapproved transaction and return a valid txMeta', function (done) {
- txController.addUnapprovedTransaction({})
+ txController.addUnapprovedTransaction({ from: '0x1678a085c290ebd122dc42cba69373b5953b831d' })
.then((txMeta) => {
assert(('id' in txMeta), 'should have a id')
assert(('time' in txMeta), 'should have a time stamp')
@@ -182,7 +182,7 @@ describe('Transaction Controller', function () {
assert(txMetaFromEmit, 'txMeta is falsey')
done()
})
- txController.addUnapprovedTransaction({})
+ txController.addUnapprovedTransaction({ from: '0x1678a085c290ebd122dc42cba69373b5953b831d' })
.catch(done)
})
@@ -213,6 +213,7 @@ describe('Transaction Controller', function () {
describe('#validateTxParams', function () {
it('does not throw for positive values', function (done) {
var sample = {
+ from: '0x1678a085c290ebd122dc42cba69373b5953b831d',
value: '0x01',
}
txController.txGasUtil.validateTxParams(sample).then(() => {
@@ -222,6 +223,7 @@ describe('Transaction Controller', function () {
it('returns error for negative values', function (done) {
var sample = {
+ from: '0x1678a085c290ebd122dc42cba69373b5953b831d',
value: '-0x01',
}
txController.txGasUtil.validateTxParams(sample)