@@ -11,39 +11,39 @@ jest.mock('unfetch', () => jest.fn(() => {
1111describe ( 'callEndpoint' , ( ) => {
1212 it ( 'should accept just a path' , ( ) => {
1313 expect (
14- callEndpoint ( 'xdai' , '/balances/supported-fiat-codes' )
14+ callEndpoint ( 'https://safe-client. xdai.staging.gnosisdev.com/v1 ' , '/balances/supported-fiat-codes' )
1515 ) . resolves . toEqual ( { success : true } )
1616
1717 expect ( fetch ) . toHaveBeenCalledWith ( 'https://safe-client.xdai.staging.gnosisdev.com/v1/balances/supported-fiat-codes' )
1818 } )
1919
2020 it ( 'should accept a path param' , ( ) => {
2121 expect (
22- callEndpoint ( 'rinkeby' , '/safe/{address}' , { path : { address : '0x123' } } )
22+ callEndpoint ( 'https://safe-client. rinkeby.staging.gnosisdev.com/v1 ' , '/safe/{address}' , { path : { address : '0x123' } } )
2323 ) . resolves . toEqual ( { success : true } )
2424
2525 expect ( fetch ) . toHaveBeenCalledWith ( 'https://safe-client.rinkeby.staging.gnosisdev.com/v1/safe/0x123' )
2626 } )
2727
2828 it ( 'should accept several path params' , ( ) => {
2929 expect (
30- callEndpoint ( 'rinkeby' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } } )
30+ callEndpoint ( 'https://safe-client. rinkeby.staging.gnosisdev.com/v1 ' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } } )
3131 ) . resolves . toEqual ( { success : true } )
3232
3333 expect ( fetch ) . toHaveBeenCalledWith ( 'https://safe-client.rinkeby.staging.gnosisdev.com/v1/balances/0x123/usd' )
3434 } )
3535
3636 it ( 'should accept query params' , ( ) => {
3737 expect (
38- callEndpoint ( 'rinkeby' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } , query : { exclude_spam : true } } )
38+ callEndpoint ( 'https://safe-client. rinkeby.staging.gnosisdev.com/v1 ' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } , query : { exclude_spam : true } } )
3939 ) . resolves . toEqual ( { success : true } )
4040
4141 expect ( fetch ) . toHaveBeenCalledWith ( 'https://safe-client.rinkeby.staging.gnosisdev.com/v1/balances/0x123/usd?exclude_spam=true' )
4242 } )
4343
4444 it ( 'should accept a raw URL' , ( ) => {
4545 expect (
46- callEndpoint ( 'rinkeby' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } , query : { exclude_spam : true } } , '/test-url?raw=true' )
46+ callEndpoint ( 'https://safe-client. rinkeby.staging.gnosisdev.com/v1 ' , '/balances/{address}/{currency}' , { path : { address : '0x123' , currency : 'usd' } , query : { exclude_spam : true } } , '/test-url?raw=true' )
4747 ) . resolves . toEqual ( { success : true } )
4848
4949 expect ( fetch ) . toHaveBeenCalledWith ( '/test-url?raw=true' )
0 commit comments