aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/config-manager-test.js
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-05-24 05:43:17 +0800
committerDan Finlay <somniac@me.com>2016-05-24 05:43:17 +0800
commit0c73e583727e8cd67df7ad119e8d453306fa5c5d (patch)
tree350ed72bc2cc609bc6fd2e638cda3ad03b7d3e61 /test/unit/config-manager-test.js
parent7f77fe1a790fbd466b91f5a8f6bf25fbd0982ae4 (diff)
parenta439e04ed4fae2bbf4da6cfca2a516991aa89178 (diff)
downloadtangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar.gz
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar.bz2
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar.lz
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar.xz
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.tar.zst
tangerine-wallet-browser-0c73e583727e8cd67df7ad119e8d453306fa5c5d.zip
Merge pull request #204 from MetaMask/dev
Merge UI redesign into master
Diffstat (limited to 'test/unit/config-manager-test.js')
-rw-r--r--test/unit/config-manager-test.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js
index e414ecb9e..aa94dc385 100644
--- a/test/unit/config-manager-test.js
+++ b/test/unit/config-manager-test.js
@@ -54,6 +54,27 @@ describe('config-manager', function() {
})
})
+ describe('wallet nicknames', function() {
+ it('should return null when no nicknames are saved', function() {
+ var nick = configManager.nicknameForWallet('0x0')
+ assert.equal(nick, null, 'no nickname returned')
+ })
+
+ it('should persist nicknames', function() {
+ var account = '0x0'
+ var nick1 = 'foo'
+ var nick2 = 'bar'
+ configManager.setNicknameForWallet(account, nick1)
+
+ var result1 = configManager.nicknameForWallet(account)
+ assert.equal(result1, nick1)
+
+ configManager.setNicknameForWallet(account, nick2)
+ var result2 = configManager.nicknameForWallet(account)
+ assert.equal(result2, nick2)
+ })
+ })
+
describe('rpc manipulations', function() {
it('changing rpc should return a different rpc', function() {
var firstRpc = 'first'