Skip to content

Commit

Permalink
#557: remove undone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Nov 30, 2022
1 parent 19c50bb commit 4c0638a
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions test/transactionalEmail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,82 +39,4 @@ describe('transactionalEmail', () => {
return;
});
});
describe('Deploy ================', () => {
beforeEach(() => {
testUtils.mockSetup(true);
});
it('Should create & upsert a transactionalEmail', async () => {
// WHEN
await handler.deploy('testInstance/testBU', ['transactionalEmail']);
// THEN
// get results from cache
const result = cache.getCache();
assert.equal(
result.transactionalEmail ? Object.keys(result.transactionalEmail).length : 0,
2,
'two transactionalEmails expected'
);
// confirm created item
assert.deepEqual(
await testUtils.getActualJson('testNew_temail', 'transactionalEmail'),
await testUtils.getExpectedJson('9999999', 'transactionalEmail', 'post'),
'returned JSON was not equal expected for insert transactionalEmail'
);
// confirm updated item
assert.deepEqual(
await testUtils.getActualJson('testExisting_temail', 'transactionalEmail'),
await testUtils.getExpectedJson('9999999', 'transactionalEmail', 'patch'),
'returned JSON was not equal expected for update transactionalEmail'
);
// check number of API calls
assert.equal(
Object.values(testUtils.getAPIHistory()).flat().length,
5,
'Unexpected number of requests made'
);
return;
});
});
describe('Templating ================', () => {
// it.skip('Should create a transactionalEmail template via retrieveAsTemplate and build it');
it('Should create a transactionalEmail template via buildTemplate and build it', async () => {
// download first before we test buildTemplate
await handler.retrieve('testInstance/testBU', ['transactionalEmail']);
// buildTemplate
const result = await handler.buildTemplate(
'testInstance/testBU',
'transactionalEmail',
['testExisting_temail'],
'testSourceMarket'
);
assert.equal(
result.transactionalEmail ? Object.keys(result.transactionalEmail).length : 0,
1,
'only one transactionalEmail expected'
);
assert.deepEqual(
await testUtils.getActualTemplateJson('testExisting_temail', 'transactionalEmail'),
await testUtils.getExpectedJson('9999999', 'transactionalEmail', 'template'),
'returned template JSON was not equal expected'
);
// buildDefinition
await handler.buildDefinition(
'testInstance/testBU',
'transactionalEmail',
'testExisting_temail',
'testTargetMarket'
);
assert.deepEqual(
await testUtils.getActualDeployJson('testExisting_temail', 'transactionalEmail'),
await testUtils.getExpectedJson('9999999', 'transactionalEmail', 'build'),
'returned deployment JSON was not equal expected'
);
assert.equal(
Object.values(testUtils.getAPIHistory()).flat().length,
4,
'Unexpected number of requests made'
);
return;
});
});
});

0 comments on commit 4c0638a

Please sign in to comment.