@@ -215,6 +215,23 @@ function getTemplate () {
215
215
} ) ;
216
216
} ) ;
217
217
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
+
218
235
lab . experiment ( 'as default javascript' , function ( ) {
219
236
const migration = new Template (
220
237
fileName ,
@@ -235,7 +252,7 @@ function getTemplate () {
235
252
lab . experiment ( 'as sql file loader' , function ( ) {
236
253
const name = 'test' ;
237
254
238
- lab . test ( 'should return sql file loader template' , ( ) => {
255
+ lab . test ( 'should return plugin specified template' , ( ) => {
239
256
const plugins = Plugins . createSinglePlugin (
240
257
`template:overwrite:provider:${ name } ` ,
241
258
opts => {
@@ -262,83 +279,6 @@ function getTemplate () {
262
279
) ;
263
280
} ) ;
264
281
} ) ;
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
- } ) ;
342
282
} ) ;
343
283
}
344
284
0 commit comments