diff options
author | Paul Bouchon <mail@bitpshr.net> | 2019-06-01 06:14:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 06:14:22 +0800 |
commit | 47024fd9a530c1554cfa74c8e74f6221e00c6135 (patch) | |
tree | 4abdaecc6c3de3f6ab6ff83268bf8b93cdee5e8d /test/unit/app/controllers/metamask-controller-test.js | |
parent | 44616befc71bc561887569ae7b523831ab470487 (diff) | |
download | tangerine-wallet-browser-47024fd9a530c1554cfa74c8e74f6221e00c6135.tar.gz tangerine-wallet-browser-47024fd9a530c1554cfa74c8e74f6221e00c6135.tar.zst tangerine-wallet-browser-47024fd9a530c1554cfa74c8e74f6221e00c6135.zip |
feature: integrate gaba/CurrencyRateController (#6570)
Diffstat (limited to 'test/unit/app/controllers/metamask-controller-test.js')
-rw-r--r-- | test/unit/app/controllers/metamask-controller-test.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller-test.js index a56b8adbd..1b8cde42e 100644 --- a/test/unit/app/controllers/metamask-controller-test.js +++ b/test/unit/app/controllers/metamask-controller-test.js @@ -45,6 +45,11 @@ describe('MetaMaskController', function () { .get(/.*/) .reply(200) + nock('https://min-api.cryptocompare.com') + .persist() + .get(/.*/) + .reply(200, '{"JPY":12415.9}') + metamaskController = new MetaMaskController({ showUnapprovedTx: noop, showUnconfirmedMessage: noop, @@ -441,7 +446,7 @@ describe('MetaMaskController', function () { let defaultMetaMaskCurrency beforeEach(function () { - defaultMetaMaskCurrency = metamaskController.currencyController.getCurrentCurrency() + defaultMetaMaskCurrency = metamaskController.currencyRateController.state.currentCurrency }) it('defaults to usd', function () { @@ -450,7 +455,7 @@ describe('MetaMaskController', function () { it('sets currency to JPY', function () { metamaskController.setCurrentCurrency('JPY', noop) - assert.equal(metamaskController.currencyController.getCurrentCurrency(), 'JPY') + assert.equal(metamaskController.currencyRateController.state.currentCurrency, 'JPY') }) }) |