From 0c6df24ecff566c84810a1b29316c1efa2c83870 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 2 Feb 2017 20:59:47 -0800 Subject: metamask - introduce networkStore --- test/unit/tx-manager-test.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'test') 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: {} } -- cgit v1.2.3