aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-11 02:34:18 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-03-11 02:34:18 +0800
commitc47f7f6a765e748c33ffde6ff38e881199251eda (patch)
tree0b12c5a57da5114faa2347f8bb12b1a390d7b3f3 /test/unit
parent7182a2be4332e7802c8d2375b9380490aed7ca0b (diff)
downloadtangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar.gz
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar.bz2
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar.lz
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar.xz
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.tar.zst
tangerine-wallet-browser-c47f7f6a765e748c33ffde6ff38e881199251eda.zip
Add another test for duplicates.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/address-book-controller.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/address-book-controller.js b/test/unit/address-book-controller.js
index f00547167..51dc898b8 100644
--- a/test/unit/address-book-controller.js
+++ b/test/unit/address-book-controller.js
@@ -23,6 +23,13 @@ describe('address-book-controller', function() {
assert.equal(addressBook[0].address, '0x01234', 'incorrect addresss')
assert.equal(addressBook[0].name, 'test', 'incorrect nickname')
})
+
+ it('should reject duplicates.', function () {
+ addressBookController.setAddressBook('0x01234', 'test')
+ addressBookController.setAddressBook('0x01234', 'test')
+ var addressBook = addressBookController._getAddressBook()
+ assert.equal(addressBook.length, 1, 'incorrect address book length.')
+ })
})
})
})