Skip to content

Commit 3d82c99

Browse files
committed
fixed asset management test cases
1 parent 0689218 commit 3d82c99

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/contentstack-asset-management/test/unit/import-setup/import-setup-asset-mappers.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as fs from 'fs';
33
import * as os from 'os';
44
import * as path from 'path';
55
import { stub, restore } from 'sinon';
6-
import { AssetManagementAdapter } from '../../../src/utils/asset-management-api-adapter';
6+
import { CSAssetsAdapter } from '../../../src/utils/cs-assets-api-adapter';
77
import ImportAssets from '../../../src/import/assets';
88
import ImportSetupAssetMappers from '../../../src/import-setup/import-setup-asset-mappers';
99

@@ -77,8 +77,8 @@ describe('ImportSetupAssetMappers', () => {
7777
fs.mkdirSync(path.join(contentDir, 'spaces', 'amspace01'), { recursive: true });
7878
fs.mkdirSync(backupDir, { recursive: true });
7979

80-
stub(AssetManagementAdapter.prototype, 'init').resolves();
81-
stub(AssetManagementAdapter.prototype, 'listSpaces').resolves({
80+
stub(CSAssetsAdapter.prototype, 'init').resolves();
81+
stub(CSAssetsAdapter.prototype, 'listSpaces').resolves({
8282
spaces: [{ uid: 'amspace01' }],
8383
});
8484
stub(ImportAssets.prototype, 'buildIdentityMappersFromExport').resolves({
@@ -133,8 +133,8 @@ describe('ImportSetupAssetMappers', () => {
133133
fs.mkdirSync(path.join(contentDir, 'spaces', 'amspace01'), { recursive: true });
134134
fs.mkdirSync(backupDir, { recursive: true });
135135

136-
stub(AssetManagementAdapter.prototype, 'init').resolves();
137-
stub(AssetManagementAdapter.prototype, 'listSpaces').resolves({ spaces: [] });
136+
stub(CSAssetsAdapter.prototype, 'init').resolves();
137+
stub(CSAssetsAdapter.prototype, 'listSpaces').resolves({ spaces: [] });
138138

139139
const buildStub = stub(ImportAssets.prototype, 'buildIdentityMappersFromExport').resolves({
140140
uidMap: {},
@@ -176,8 +176,8 @@ describe('ImportSetupAssetMappers', () => {
176176
fs.mkdirSync(path.join(contentDir, 'custom_spaces', 'amspace99'), { recursive: true });
177177
fs.mkdirSync(backupDir, { recursive: true });
178178

179-
stub(AssetManagementAdapter.prototype, 'init').resolves();
180-
stub(AssetManagementAdapter.prototype, 'listSpaces').resolves({
179+
stub(CSAssetsAdapter.prototype, 'init').resolves();
180+
stub(CSAssetsAdapter.prototype, 'listSpaces').resolves({
181181
spaces: [{ uid: 'amspace99' }],
182182
});
183183

@@ -231,8 +231,8 @@ describe('ImportSetupAssetMappers', () => {
231231
fs.mkdirSync(path.join(contentDir, 'spaces', 'amX'), { recursive: true });
232232
fs.mkdirSync(backupDir, { recursive: true });
233233

234-
stub(AssetManagementAdapter.prototype, 'init').resolves();
235-
stub(AssetManagementAdapter.prototype, 'listSpaces').resolves({ spaces: [{ uid: 'amX' }] });
234+
stub(CSAssetsAdapter.prototype, 'init').resolves();
235+
stub(CSAssetsAdapter.prototype, 'listSpaces').resolves({ spaces: [{ uid: 'amX' }] });
236236

237237
stub(ImportAssets.prototype, 'buildIdentityMappersFromExport').callsFake(async function fetchConcCheck(
238238
this: ImportAssets,

0 commit comments

Comments
 (0)