diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-11 02:34:18 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-11 02:34:18 +0800 |
commit | c47f7f6a765e748c33ffde6ff38e881199251eda (patch) | |
tree | 0b12c5a57da5114faa2347f8bb12b1a390d7b3f3 /test | |
parent | 7182a2be4332e7802c8d2375b9380490aed7ca0b (diff) | |
download | tangerine-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')
-rw-r--r-- | test/unit/address-book-controller.js | 7 |
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.') + }) }) }) }) |