Skip to content

Commit 64bdffa

Browse files
fix: asset relations api test endpoint fix
1 parent eced347 commit 64bdffa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/integration/api/admin/related_assets_spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Asset relations API', () => {
2323

2424
const [calledWithUrl] = requestSpy.firstCall.args;
2525
strictEqual(calledWithUrl.method, 'POST');
26-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/image/upload/test-public-id`);
26+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/image/upload/test-public-id`);
2727
const callApiArguments = writeSpy.firstCall.args;
2828
deepStrictEqual(callApiArguments, ['assets_to_relate=related-public-id']);
2929
});
@@ -38,7 +38,7 @@ describe('Asset relations API', () => {
3838

3939
const [calledWithUrl] = requestSpy.firstCall.args;
4040
strictEqual(calledWithUrl.method, 'POST');
41-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/image/upload/${testPublicId}`);
41+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/image/upload/${testPublicId}`);
4242
const callApiArguments = writeSpy.firstCall.args;
4343
deepStrictEqual(callApiArguments, ['assets_to_relate=related-public-id-1&assets_to_relate=related-public-id-2']);
4444
});
@@ -52,7 +52,7 @@ describe('Asset relations API', () => {
5252

5353
const [calledWithUrl] = requestSpy.firstCall.args;
5454
strictEqual(calledWithUrl.method, 'POST');
55-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/test-asset-id`);
55+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/test-asset-id`);
5656
const callApiArguments = writeSpy.firstCall.args;
5757
deepStrictEqual(callApiArguments, ['assets_to_relate=related-public-id']);
5858
});
@@ -64,7 +64,7 @@ describe('Asset relations API', () => {
6464

6565
const [calledWithUrl] = requestSpy.firstCall.args;
6666
strictEqual(calledWithUrl.method, 'POST');
67-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/test-asset-id`);
67+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/test-asset-id`);
6868
const callApiArguments = writeSpy.firstCall.args;
6969
deepStrictEqual(callApiArguments, ['assets_to_relate=related-public-id-1&assets_to_relate=related-public-id-2']);
7070
});
@@ -83,7 +83,7 @@ describe('Asset relations API', () => {
8383

8484
const [calledWithUrl] = requestSpy.firstCall.args;
8585
strictEqual(calledWithUrl.method, 'DELETE');
86-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/image/upload/test-public-id`);
86+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/image/upload/test-public-id`);
8787
const callApiArguments = writeSpy.firstCall.args;
8888
deepStrictEqual(callApiArguments, ['assets_to_unrelate=related-public-id']);
8989
});
@@ -98,7 +98,7 @@ describe('Asset relations API', () => {
9898

9999
const [calledWithUrl] = requestSpy.firstCall.args;
100100
strictEqual(calledWithUrl.method, 'DELETE');
101-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/image/upload/test-public-id`);
101+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/image/upload/test-public-id`);
102102
const callApiArguments = writeSpy.firstCall.args;
103103
deepStrictEqual(callApiArguments, ['assets_to_unrelate=related-public-id-1&assets_to_unrelate=related-public-id-2']);
104104
});
@@ -112,7 +112,7 @@ describe('Asset relations API', () => {
112112

113113
const [calledWithUrl] = requestSpy.firstCall.args;
114114
strictEqual(calledWithUrl.method, 'DELETE');
115-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/test-asset-id`);
115+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/test-asset-id`);
116116
const callApiArguments = writeSpy.firstCall.args;
117117
deepStrictEqual(callApiArguments, ['assets_to_unrelate=related-public-id']);
118118
});
@@ -124,7 +124,7 @@ describe('Asset relations API', () => {
124124

125125
const [calledWithUrl] = requestSpy.firstCall.args;
126126
strictEqual(calledWithUrl.method, 'DELETE');
127-
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/test-asset-id`);
127+
strictEqual(calledWithUrl.path, `/v1_1/${TEST_CLOUD_NAME}/resources/related_assets/test-asset-id`);
128128
const callApiArguments = writeSpy.firstCall.args;
129129
deepStrictEqual(callApiArguments, ['assets_to_unrelate=related-public-id-1&assets_to_unrelate=related-public-id-2']);
130130
});

0 commit comments

Comments
 (0)