diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-23 07:36:50 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-23 07:36:50 +0800 |
commit | 2966d46fa29641ad478cc83b5ee4c6c8adf1c63b (patch) | |
tree | 6f2e4e3fffa6728d29482e2c475273b4510ac880 /test | |
parent | 136296aad6058c4bea8c3083e8ae553b2afcab98 (diff) | |
parent | c8176c9439cebf2cf65efbc73a633f8e1b643128 (diff) | |
download | tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar.gz tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar.bz2 tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar.lz tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar.xz tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.tar.zst tangerine-wallet-browser-2966d46fa29641ad478cc83b5ee4c6c8adf1c63b.zip |
Merge branch 'dev' into i843-MoveSaltIntoEncryptor
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/account-link-test.js | 10 | ||||
-rw-r--r-- | test/unit/actions/set_selected_account_test.js | 1 | ||||
-rw-r--r-- | test/unit/idStore-migration-test.js | 2 | ||||
-rw-r--r-- | test/unit/idStore-test.js | 3 | ||||
-rw-r--r-- | test/unit/keyring-controller-test.js | 5 | ||||
-rw-r--r-- | test/unit/keyrings/hd-test.js | 8 | ||||
-rw-r--r-- | test/unit/keyrings/simple-test.js | 6 |
7 files changed, 19 insertions, 16 deletions
diff --git a/test/unit/account-link-test.js b/test/unit/account-link-test.js index 39889b6be..4ea12e002 100644 --- a/test/unit/account-link-test.js +++ b/test/unit/account-link-test.js @@ -3,9 +3,15 @@ var linkGen = require('../../ui/lib/account-link') describe('account-link', function() { - it('adds testnet prefix to morden test network', function() { + it('adds morden prefix to morden test network', function() { var result = linkGen('account', '2') - assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected') + assert.notEqual(result.indexOf('morden'), -1, 'testnet included') + assert.notEqual(result.indexOf('account'), -1, 'account included') + }) + + it('adds testnet prefix to ropsten test network', function() { + var result = linkGen('account', '3') + assert.notEqual(result.indexOf('testnet'), -1, 'testnet included') assert.notEqual(result.indexOf('account'), -1, 'account included') }) diff --git a/test/unit/actions/set_selected_account_test.js b/test/unit/actions/set_selected_account_test.js index 69eb11e47..f72ca82e4 100644 --- a/test/unit/actions/set_selected_account_test.js +++ b/test/unit/actions/set_selected_account_test.js @@ -44,6 +44,5 @@ describe('SHOW_ACCOUNT_DETAIL', function() { var resultingState = reducers(initialState, action) assert.equal(resultingState.metamask.selectedAccount, action.value) - assert.equal(resultingState.metamask.selectedAddress, action.value) }) }) diff --git a/test/unit/idStore-migration-test.js b/test/unit/idStore-migration-test.js index 59801c868..ac8e23d22 100644 --- a/test/unit/idStore-migration-test.js +++ b/test/unit/idStore-migration-test.js @@ -52,7 +52,7 @@ describe('IdentityStore to KeyringController migration', function() { }, }) - idStore._createVault(password, mockVault.seed, null, (err) => { + idStore._createVault(password, mockVault.seed, (err) => { assert.ifError(err, 'createNewVault threw error') originalKeystore = idStore._idmgmt.keyStore diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js index 064483ba0..72ecf34d5 100644 --- a/test/unit/idStore-test.js +++ b/test/unit/idStore-test.js @@ -11,7 +11,6 @@ describe('IdentityStore', function() { describe('#createNewVault', function () { let idStore let password = 'password123' - let entropy = 'entripppppyy duuude' let seedWords let accounts = [] let originalKeystore @@ -26,7 +25,7 @@ describe('IdentityStore', function() { }, }) - idStore.createNewVault(password, entropy, (err, seeds) => { + idStore.createNewVault(password, (err, seeds) => { assert.ifError(err, 'createNewVault threw error') seedWords = seeds originalKeystore = idStore._idmgmt.keyStore diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js index 2527defe3..437441e0e 100644 --- a/test/unit/keyring-controller-test.js +++ b/test/unit/keyring-controller-test.js @@ -12,7 +12,6 @@ describe('KeyringController', function() { let keyringController, state let password = 'password123' - let entropy = 'entripppppyy duuude' let seedWords = 'puzzle seed penalty soldier say clay field arctic metal hen cage runway' let addresses = ['eF35cA8EbB9669A35c31b5F6f249A9941a812AC1'.toLowerCase()] let accounts = [] @@ -33,7 +32,7 @@ describe('KeyringController', function() { // Browser crypto is tested in the integration test suite. keyringController.encryptor = mockEncryptor - keyringController.createNewVaultAndKeychain(password, null, function (err, newState) { + keyringController.createNewVaultAndKeychain(password, function (err, newState) { assert.ifError(err) state = newState done() @@ -51,7 +50,7 @@ describe('KeyringController', function() { it('should set a vault on the configManager', function(done) { keyringController.configManager.setVault(null) assert(!keyringController.configManager.getVault(), 'no previous vault') - keyringController.createNewVaultAndKeychain(password, null, (err, state) => { + keyringController.createNewVaultAndKeychain(password, (err, state) => { assert.ifError(err) const vault = keyringController.configManager.getVault() assert(vault, 'vault created') diff --git a/test/unit/keyrings/hd-test.js b/test/unit/keyrings/hd-test.js index c22ffc913..bec1a8134 100644 --- a/test/unit/keyrings/hd-test.js +++ b/test/unit/keyrings/hd-test.js @@ -27,9 +27,9 @@ describe('hd-keyring', function() { assert.equal(accounts[1], secondAcct) }) - describe('Keyring.type()', function() { - it('is a class method that returns the type string.', function() { - const type = HdKeyring.type() + describe('Keyring.type', function() { + it('is a class property that returns the type string.', function() { + const type = HdKeyring.type assert.equal(typeof type, 'string') }) }) @@ -37,7 +37,7 @@ describe('hd-keyring', function() { describe('#type', function() { it('returns the correct value', function() { const type = keyring.type - const correct = HdKeyring.type() + const correct = HdKeyring.type assert.equal(type, correct) }) }) diff --git a/test/unit/keyrings/simple-test.js b/test/unit/keyrings/simple-test.js index ba000a7a8..96a2fdcf0 100644 --- a/test/unit/keyrings/simple-test.js +++ b/test/unit/keyrings/simple-test.js @@ -13,9 +13,9 @@ describe('simple-keyring', function() { keyring = new SimpleKeyring() }) - describe('Keyring.type()', function() { - it('is a class method that returns the type string.', function() { - const type = SimpleKeyring.type() + describe('Keyring.type', function() { + it('is a class property that returns the type string.', function() { + const type = SimpleKeyring.type assert.equal(type, TYPE_STR) }) }) |