aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/test
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-09-05 06:47:49 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-09-05 06:49:30 +0800
commit69eb820d0dbca63a6725d99d2d547506e60068ce (patch)
tree1bfadf33a77f2744d241a5956408f7c70f12b0b6 /packages/connect/test
parenta3527a77a6b1de2a808f6a3100c396cb0e0c617f (diff)
downloaddexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar.gz
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar.bz2
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar.lz
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar.xz
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.tar.zst
dexon-sol-tools-69eb820d0dbca63a6725d99d2d547506e60068ce.zip
Change orderConfig from POST to GET like in spec
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 e9fc9372e..83b77021a 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.post(url, orderConfigResponseJSON);
+ fetchMock.get(url, orderConfigResponseJSON);
const fees = await relayerClient.getOrderConfigAsync(request);
expect(fees).to.be.deep.equal(orderConfigResponse);
});
it('does not mutate input', async () => {
- fetchMock.post(url, orderConfigResponseJSON);
+ fetchMock.get(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.post(url, { test: 'dummy' });
+ fetchMock.get(url, { test: 'dummy' });
expect(relayerClient.getOrderConfigAsync(request)).to.be.rejected();
});
});