Skip to content

Commit

Permalink
#1471: adapt tests to --noMidSuffix getting replaced by --autoMidSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jul 22, 2024
1 parent 26d9808 commit e808657
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions test/type.asset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ describe('type: asset', () => {
});

it('Should create an asset with mis-matching memberId, automatically adding the MID suffix', async () => {
handler.setOptions({ autoMidSuffix: true });
// WHEN
const deployResult = await handler.deploy(
'testInstance/testBU',
Expand All @@ -250,7 +251,7 @@ describe('type: asset', () => {
assert.equal(
upsertCallout?.customerKey,
'testNew_asset-9999999',
'customerKey should be testNew_asset-9999999 due to automatic MID suffix'
'customerKey should be testNew_asset-9999999 due to --autoMidSuffix'
);

// insert
Expand All @@ -268,8 +269,8 @@ describe('type: asset', () => {
return;
});

it('Should create an assetwith mis-matching memberId, --noMidSuffix and --keySuffix', async () => {
handler.setOptions({ keySuffix: '_DEV', noMidSuffix: true });
it('Should create an assetwith mis-matching memberId and --keySuffix', async () => {
handler.setOptions({ keySuffix: '_DEV' });
// WHEN
const deployResult = await handler.deploy(
'testInstance/testBU',
Expand All @@ -291,7 +292,7 @@ describe('type: asset', () => {
assert.equal(
upsertCallout?.customerKey,
'testNew_asset_DEV',
'customerKey should be testNew_asset_DEV due to noMidSuffix and keySuffix'
'customerKey should be testNew_asset_DEV due to --keySuffix'
);

assert.equal(
Expand All @@ -302,8 +303,7 @@ describe('type: asset', () => {
return;
});

it('Should create an assetwith mis-matching memberId, --noMidSuffix', async () => {
handler.setOptions({ noMidSuffix: true });
it('Should create an assetwith mis-matching memberId', async () => {
// WHEN
const deployResult = await handler.deploy(
'testInstance/testBU',
Expand All @@ -325,7 +325,7 @@ describe('type: asset', () => {
assert.equal(
upsertCallout?.customerKey,
'testNew_asset',
'customerKey should be testNew_asset due to noMidSuffix'
'customerKey should be testNew_asset'
);

assert.equal(
Expand Down
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export function mockSetup(isDeploy) {
noLogFile: true,
// reset
api: undefined,
autoMidSuffix: undefined,
changeKeyField: undefined,
changeKeyValue: undefined,
commitHistory: undefined,
Expand All @@ -174,7 +175,6 @@ export function mockSetup(isDeploy) {
keySuffix: undefined,
like: undefined,
noUpdate: undefined,
noMidSuffix: undefined,
publish: undefined,
referenceFrom: undefined,
referenceTo: undefined,
Expand Down

0 comments on commit e808657

Please sign in to comment.