aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-08 08:01:51 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-03-08 08:01:51 +0800
commite7e024bcdd2c93b34a0baf8bc27e6c571c098476 (patch)
tree26ab0b013f3c10d0db040aeea3baac798e3bb390 /test/unit
parent08ca7dac5a15e104084c6da3eb6015136b316809 (diff)
downloadtangerine-wallet-browser-e7e024bcdd2c93b34a0baf8bc27e6c571c098476.tar.gz
tangerine-wallet-browser-e7e024bcdd2c93b34a0baf8bc27e6c571c098476.tar.zst
tangerine-wallet-browser-e7e024bcdd2c93b34a0baf8bc27e6c571c098476.zip
Refactor of code into separate reducers and actions.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/actions/config_test.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/unit/actions/config_test.js b/test/unit/actions/config_test.js
index eca2f7c8f..02704cb42 100644
--- a/test/unit/actions/config_test.js
+++ b/test/unit/actions/config_test.js
@@ -36,16 +36,10 @@ describe ('config view actions', function() {
value: 'foo',
}
- const secondAction = {
- type: actions.SET_RPC_LIST,
- value: ['foo'],
- }
-
var result = reducers(initialState, action)
result = reducers(result, secondAction)
assert.equal(result.metamask.provider.type, 'rpc')
assert.equal(result.metamask.provider.rpcTarget, 'foo')
- assert.equal(result.metamask.frequentRpcList[0], 'foo')
})
it('should handle multiple requests to change the rpc gracefully', function() {
@@ -60,10 +54,8 @@ describe ('config view actions', function() {
}
var result = reducers(initialState, action)
- var secondResult = reducers(result, secondAction)
- var thirdResult = reducers(secondResult, action)
- var fourthResult = reducers(thirdResult, secondAction)
- assert.equal(fourthResult.metamask.frequentRpcList.length, 1)
+ var secondResult = reducers(result, action)
+ assert.equal(secondResult.metamask.frequentRpcList.length, 1)
})
})