Skip to content

Commit 7ae7125

Browse files
committed
chore(test): revisit template test
Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent 947b6c8 commit 7ae7125

File tree

1 file changed

+18
-78
lines changed

1 file changed

+18
-78
lines changed

test/migration_test.js

Lines changed: 18 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,23 @@ function getTemplate () {
215215
});
216216
});
217217

218+
lab.experiment('as sql default ignore on init template', function () {
219+
const migration = new Template(
220+
fileName,
221+
dirName,
222+
date,
223+
Template.TemplateType.SQL_FILE_LOADER_IGNORE_ON_INIT,
224+
internals
225+
);
226+
227+
lab.test('should return sql ignore on init template', () => {
228+
const actual = migration.getTemplate();
229+
Code.expect(actual).to.equal(
230+
migration.sqlFileLoaderIgnoreOnInitTemplate()
231+
);
232+
});
233+
});
234+
218235
lab.experiment('as default javascript', function () {
219236
const migration = new Template(
220237
fileName,
@@ -235,7 +252,7 @@ function getTemplate () {
235252
lab.experiment('as sql file loader', function () {
236253
const name = 'test';
237254

238-
lab.test('should return sql file loader template', () => {
255+
lab.test('should return plugin specified template', () => {
239256
const plugins = Plugins.createSinglePlugin(
240257
`template:overwrite:provider:${name}`,
241258
opts => {
@@ -262,83 +279,6 @@ function getTemplate () {
262279
);
263280
});
264281
});
265-
266-
lab.experiment('as default sql', function () {
267-
const migration = new Template(
268-
fileName,
269-
dirName,
270-
date,
271-
Template.TemplateType.DEFAULT_SQL,
272-
internals
273-
);
274-
275-
lab.test('should return default sql template', () => {
276-
const actual = migration.getTemplate();
277-
Code.expect(actual).to.equal(migration.defaultSqlTemplate());
278-
});
279-
});
280-
281-
lab.experiment('as sql default ignore on init template', function () {
282-
const migration = new Template(
283-
fileName,
284-
dirName,
285-
date,
286-
Template.TemplateType.SQL_FILE_LOADER_IGNORE_ON_INIT,
287-
internals
288-
);
289-
290-
lab.test('should return sql ignore on init template', () => {
291-
const actual = migration.getTemplate();
292-
Code.expect(actual).to.equal(
293-
migration.sqlFileLoaderIgnoreOnInitTemplate()
294-
);
295-
});
296-
});
297-
298-
lab.experiment('as default coffee', function () {
299-
const migration = new Template(
300-
fileName,
301-
dirName,
302-
date,
303-
Template.TemplateType.DEFAULT_COFFEE,
304-
internals
305-
);
306-
307-
lab.test('should return default coffee template', () => {
308-
const actual = migration.getTemplate();
309-
Code.expect(actual).to.equal(migration.defaultCoffeeTemplate());
310-
});
311-
});
312-
313-
lab.experiment('as coffee sql loader', function () {
314-
const migration = new Template(
315-
fileName,
316-
dirName,
317-
date,
318-
Template.TemplateType.COFFEE_SQL_FILE_LOADER,
319-
internals
320-
);
321-
322-
lab.test('should return default coffee template', () => {
323-
const actual = migration.getTemplate();
324-
Code.expect(actual).to.equal(migration.coffeeSqlFileLoaderTemplate());
325-
});
326-
});
327-
328-
lab.experiment('as default javascript', function () {
329-
const migration = new Template(
330-
fileName,
331-
dirName,
332-
date,
333-
Template.TemplateType.DEFAULT_JS,
334-
internals
335-
);
336-
337-
lab.test('should return default sql template', () => {
338-
const actual = migration.getTemplate();
339-
Code.expect(actual).to.equal(migration.defaultJsTemplate());
340-
});
341-
});
342282
});
343283
}
344284

0 commit comments

Comments
 (0)