aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/test
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-09-26 20:01:51 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-09-26 20:01:51 +0800
commite5e439adb9d1ff4395c0ff42ac3a310783b3bd22 (patch)
tree8052ac2a5737d5f674e332e782a728e06b2b4323 /packages/connect/test
parent2d8f423ceeabb535a2c333a5c6a593736959b68d (diff)
downloaddexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar.gz
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar.bz2
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar.lz
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar.xz
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.tar.zst
dexon-sol-tools-e5e439adb9d1ff4395c0ff42ac3a310783b3bd22.zip
Change /order_config endpoint to POST
Diffstat (limited to 'packages/connect/test')
-rw-r--r--packages/connect/test/http_client_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts
index 83b77021a..e9fc9372e 100644
--- a/packages/connect/test/http_client_test.ts
+++ b/packages/connect/test/http_client_test.ts
@@ -148,12 +148,12 @@ describe('HttpClient', () => {
};
const url = `${relayUrl}/order_config`;
it('gets order config', async () => {
- fetchMock.get(url, orderConfigResponseJSON);
+ fetchMock.post(url, orderConfigResponseJSON);
const fees = await relayerClient.getOrderConfigAsync(request);
expect(fees).to.be.deep.equal(orderConfigResponse);
});
it('does not mutate input', async () => {
- fetchMock.get(url, orderConfigResponseJSON);
+ fetchMock.post(url, orderConfigResponseJSON);
const makerAssetAmountBefore = request.makerAssetAmount;
const takerAssetAmountBefore = request.takerAssetAmount;
const expirationTimeSecondsBefore = request.expirationTimeSeconds;
@@ -163,7 +163,7 @@ describe('HttpClient', () => {
expect(expirationTimeSecondsBefore).to.be.deep.equal(request.expirationTimeSeconds);
});
it('throws an error for invalid JSON response', async () => {
- fetchMock.get(url, { test: 'dummy' });
+ fetchMock.post(url, { test: 'dummy' });
expect(relayerClient.getOrderConfigAsync(request)).to.be.rejected();
});
});