aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2016-06-17 08:27:50 +0800
committerGitHub <noreply@github.com>2016-06-17 08:27:50 +0800
commitbdb113fabe9091b195d70f7f61246b6647b3b0a4 (patch)
treef5fdbfc8f997c1aeafee3074a2f143ed63c2d7e0 /test
parent6f19e9d5a9d246b8b7253865388042d45875c505 (diff)
parent65f9f997b002cd2a8a3eb0ba9dc12d7635cd4ec3 (diff)
downloadtangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar.gz
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar.bz2
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar.lz
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar.xz
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.tar.zst
tangerine-wallet-browser-bdb113fabe9091b195d70f7f61246b6647b3b0a4.zip
Merge pull request #295 from MetaMask/AddDisclaimer
Create disclaimer view
Diffstat (limited to 'test')
-rw-r--r--test/unit/config-manager-test.js32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js
index aa94dc385..130bde2ff 100644
--- a/test/unit/config-manager-test.js
+++ b/test/unit/config-manager-test.js
@@ -4,11 +4,41 @@ var configManager
describe('config-manager', function() {
- before(function() {
+ beforeEach(function() {
window.localStorage = {} // Hacking localStorage support into JSDom
configManager = new ConfigManager()
})
+ describe('confirmation', function() {
+
+ describe('#getConfirmed', function() {
+ it('should return false if no previous key exists', function() {
+ var result = configManager.getConfirmed()
+ assert.ok(!result)
+ })
+ })
+
+ describe('#setConfirmed', function() {
+ it('should make getConfirmed return true once set', function() {
+ configManager.setConfirmed(true)
+ var result = configManager.getConfirmed()
+ assert.equal(result, true)
+ })
+
+ it('should be able to set false', function() {
+ configManager.setConfirmed(false)
+ var result = configManager.getConfirmed()
+ assert.equal(result, false)
+ })
+
+ it('should persist to local storage', function() {
+ configManager.setConfirmed(true)
+ var data = configManager.getData()
+ assert.equal(data.isConfirmed, true)
+ })
+ })
+ })
+
describe('#setConfig', function() {
window.localStorage = {} // Hacking localStorage support into JSDom