aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-02-03 10:21:22 +0800
committerkumavis <aaron@kumavis.me>2017-02-03 10:21:22 +0800
commitbcb86f38cbe91fb814d30b3129de76dba45bff66 (patch)
tree37b3d7ed66d01d21540887d3004ebfbda2a13dd8 /test/unit
parent79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100 (diff)
downloadtangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.gz
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.bz2
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.lz
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.xz
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.zst
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.zip
messageManager - move view state to obs-store
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/message-manager-test.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/test/unit/message-manager-test.js b/test/unit/message-manager-test.js
index 68b977058..faf7429d4 100644
--- a/test/unit/message-manager-test.js
+++ b/test/unit/message-manager-test.js
@@ -13,7 +13,7 @@ describe('Transaction Manager', function() {
describe('#getMsgList', function() {
it('when new should return empty array', function() {
- var result = messageManager.getMsgList()
+ var result = messageManager.messages
assert.ok(Array.isArray(result))
assert.equal(result.length, 0)
})
@@ -22,20 +22,11 @@ describe('Transaction Manager', function() {
})
})
- describe('#_saveMsgList', function() {
- it('saves the submitted data to the Msg list', function() {
- var target = [{ foo: 'bar', metamaskNetworkId: 'unit test' }]
- messageManager._saveMsgList(target)
- var result = messageManager.getMsgList()
- assert.equal(result[0].foo, 'bar')
- })
- })
-
describe('#addMsg', function() {
it('adds a Msg returned in getMsgList', function() {
var Msg = { id: 1, status: 'approved', metamaskNetworkId: 'unit test' }
messageManager.addMsg(Msg)
- var result = messageManager.getMsgList()
+ var result = messageManager.messages
assert.ok(Array.isArray(result))
assert.equal(result.length, 1)
assert.equal(result[0].id, 1)
@@ -47,7 +38,7 @@ describe('Transaction Manager', function() {
var Msg = { id: 1, status: 'unapproved', metamaskNetworkId: 'unit test' }
messageManager.addMsg(Msg)
messageManager.setMsgStatusApproved(1)
- var result = messageManager.getMsgList()
+ var result = messageManager.messages
assert.ok(Array.isArray(result))
assert.equal(result.length, 1)
assert.equal(result[0].status, 'approved')
@@ -59,7 +50,7 @@ describe('Transaction Manager', function() {
var Msg = { id: 1, status: 'unapproved', metamaskNetworkId: 'unit test' }
messageManager.addMsg(Msg)
messageManager.rejectMsg(1)
- var result = messageManager.getMsgList()
+ var result = messageManager.messages
assert.ok(Array.isArray(result))
assert.equal(result.length, 1)
assert.equal(result[0].status, 'rejected')