diff options
Diffstat (limited to 'test/unit/tx-manager-test.js')
-rw-r--r-- | test/unit/tx-manager-test.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/unit/tx-manager-test.js b/test/unit/tx-manager-test.js index f03294ce3..3b64f340b 100644 --- a/test/unit/tx-manager-test.js +++ b/test/unit/tx-manager-test.js @@ -1,6 +1,7 @@ const assert = require('assert') const extend = require('xtend') const EventEmitter = require('events') +const ObservableStore = require('obs-store') const STORAGE_KEY = 'metamask-persistance-key' const TransactionManager = require('../../app/scripts/transaction-manager') const noop = () => true @@ -9,11 +10,10 @@ describe('Transaction Manager', function() { let txManager beforeEach(function() { - txManager = new TransactionManager ({ - provider: "testnet", + txManager = new TransactionManager({ + networkStore: new ObservableStore({ network: 'unit test' }), txHistoryLimit: 10, blockTracker: new EventEmitter(), - getNetwork: function(){ return 'unit test' }, getSelectedAddress: function(){ return '0xabcd' }, }) }) @@ -50,15 +50,6 @@ describe('Transaction Manager', function() { }) }) - describe('#_saveTxList', function() { - it('saves the submitted data to the tx list', function() { - var target = [{ foo: 'bar', metamaskNetworkId: 'unit test', txParams: {} }] - txManager._saveTxList(target) - var result = txManager.getTxList() - assert.equal(result[0].foo, 'bar') - }) - }) - describe('#addTx', function() { it('adds a tx returned in getTxList', function() { var tx = { id: 1, status: 'confirmed', metamaskNetworkId: 'unit test', txParams: {} } |