aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-02-03 12:59:47 +0800
committerkumavis <aaron@kumavis.me>2017-02-03 12:59:47 +0800
commit0c6df24ecff566c84810a1b29316c1efa2c83870 (patch)
treee621ee6b775d96775bb80082b0afaddb72dee85b /test
parent99fa9ab13aaf69cb8602612816a4df49209fa8a6 (diff)
downloadtangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar.gz
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar.bz2
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar.lz
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar.xz
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.tar.zst
tangerine-wallet-browser-0c6df24ecff566c84810a1b29316c1efa2c83870.zip
metamask - introduce networkStore
Diffstat (limited to 'test')
-rw-r--r--test/unit/tx-manager-test.js15
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: {} }