mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Modify tests for new api mock.'
This commit is contained in:
parent
203a573f3f
commit
f7773538eb
@ -36,7 +36,7 @@ describe('currency-controller', function () {
|
|||||||
describe('#updateConversionRate', function () {
|
describe('#updateConversionRate', function () {
|
||||||
it('should retrieve an update for ETH to USD and set it in memory', function (done) {
|
it('should retrieve an update for ETH to USD and set it in memory', function (done) {
|
||||||
this.timeout(15000)
|
this.timeout(15000)
|
||||||
nock('https://www.cryptonator.com')
|
nock('https://api.cryptonator.com')
|
||||||
.get('/api/ticker/eth-USD')
|
.get('/api/ticker/eth-USD')
|
||||||
.reply(200, '{"ticker":{"base":"ETH","target":"USD","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
.reply(200, '{"ticker":{"base":"ETH","target":"USD","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ describe('currency-controller', function () {
|
|||||||
this.timeout(15000)
|
this.timeout(15000)
|
||||||
assert.equal(currencyController.getConversionRate(), 0)
|
assert.equal(currencyController.getConversionRate(), 0)
|
||||||
|
|
||||||
nock('https://www.cryptonator.com')
|
nock('https://api.cryptonator.com')
|
||||||
.get('/api/ticker/eth-JPY')
|
.get('/api/ticker/eth-JPY')
|
||||||
.reply(200, '{"ticker":{"base":"ETH","target":"JPY","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
.reply(200, '{"ticker":{"base":"ETH","target":"JPY","price":"11.02456145","volume":"44948.91745289","change":"-0.01472534"},"timestamp":1472072136,"success":true,"error":""}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user