diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-07-01 02:30:46 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-07-01 02:30:46 +0800 |
commit | f49b6ca1dc6b71a3280135a0a901311b289c26ed (patch) | |
tree | ceb9a2d2c96d30d641dff60109a23624666076b0 /test | |
parent | 179d176dc1bd57bdaf3cab0896738281b60e78d7 (diff) | |
download | tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar.gz tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar.bz2 tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar.lz tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar.xz tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.tar.zst tangerine-wallet-browser-f49b6ca1dc6b71a3280135a0a901311b289c26ed.zip |
Replicated really strange bug with test
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/config-manager-test.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js index 7891c5c9e..69c462286 100644 --- a/test/unit/config-manager-test.js +++ b/test/unit/config-manager-test.js @@ -22,6 +22,7 @@ describe('config-manager', function() { describe('#setConfirmed', function() { it('should make getConfirmed return true once set', function() { + assert.equal(configManager.getConfirmed(), false) configManager.setConfirmed(true) var result = configManager.getConfirmed() assert.equal(result, true) @@ -41,6 +42,17 @@ describe('config-manager', function() { }) }) + describe('#clearWallet', function() { + it('should not erase confirmation', function() { + configManager.setConfirmed(true) + assert.equal(configManager.getConfirmed(), true) + + configManager.clearWallet() + + assert.equal(configManager.getConfirmed(), true) + }) + }) + describe('#setConfig', function() { window.localStorage = {} // Hacking localStorage support into JSDom @@ -63,8 +75,9 @@ describe('config-manager', function() { provider: { type: 'rpc', rpcTarget: 'foobar' - } + }, } + configManager.setConfirmed(true) configManager.setConfig(testConfig) var testWallet = { @@ -75,6 +88,7 @@ describe('config-manager', function() { var result = configManager.getData() assert.equal(result.wallet.name, testWallet.name, 'wallet name is set') assert.equal(result.config.provider.rpcTarget, testConfig.provider.rpcTarget) + assert.equal(configManager.getConfirmed(), true) testConfig.provider.type = 'something else!' configManager.setConfig(testConfig) @@ -83,6 +97,7 @@ describe('config-manager', function() { assert.equal(result.wallet.name, testWallet.name, 'wallet name is set') assert.equal(result.config.provider.rpcTarget, testConfig.provider.rpcTarget) assert.equal(result.config.provider.type, testConfig.provider.type) + assert.equal(configManager.getConfirmed(), true) }) }) |