@@ -16,8 +16,7 @@ describe( 'New (backend seed)', function ( ) {
1616
1717 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'config' , 'default.json' ) ) ) . to . be . true ;
1818 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'controllers' , 'TestingNewController.js' ) ) ) . to . be . true ;
19- expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'odm' , 'TestingNewModel.js' ) ) ) . to . be . true ;
20- expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'orm' , 'TestingNewModel.js' ) ) ) . to . be . true ;
19+ expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'TestingNewModel.js' ) ) ) . to . be . true ;
2120 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'schema' , 'seedData.json' ) ) ) . to . be . true ;
2221 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'services' , 'TestingNewService.js' ) ) ) . to . be . true ;
2322 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'tasks' , 'TestingNewTask.js' ) ) ) . to . be . true ;
@@ -26,21 +25,16 @@ describe( 'New (backend seed)', function ( ) {
2625 expect ( fs . existsSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'tests' , 'unit' , 'TestingNewTest.js' ) ) ) . to . be . true ;
2726
2827 var controller = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'controllers' , 'TestingNewController.js' ) ) ;
29- expect ( controller ) . to . match ( / m o d u l e \. e x p o r t s = f u n c t i o n \( T e s t i n g N e w S e r v i c e \) \{ / ) ;
28+ expect ( controller ) . to . match ( / m o d u l e \. e x p o r t s = f u n c t i o n \( C o n t r o l l e r , T e s t i n g N e w S e r v i c e \) \{ / ) ;
3029 expect ( controller ) . to . match ( / s e r v i c e : T e s t i n g N e w S e r v i c e / ) ;
31- expect ( controller ) . to . match ( / m e s s a g e : " H e l l o f r o m c u s t o m A c t i o n i n s i d e T e s t i n g N e w C o n t r o l l e r " / ) ;
3230
33- var odmModel = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'odm' , 'TestingNewModel.js' ) ) ;
34- expect ( odmModel ) . to . match ( / r e t u r n m o n g o o s e \. m o d e l \( ' T e s t i n g N e w ' , M o d e l S c h e m a \) ; / ) ;
35-
36- var ormModel = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'orm' , 'TestingNewModel.js' ) ) ;
37- expect ( ormModel ) . to . match ( / r e t u r n s e q u e l i z e .d e f i n e \( " T e s t i n g N e w " , \{ / ) ;
31+ var model = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'models' , 'TestingNewModel.js' ) ) ;
32+ expect ( model ) . to . match ( / r e t u r n M o d e l \. e x t e n d \( " T e s t i n g N e w " , / ) ;
3833
3934 var service = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'services' , 'TestingNewService.js' ) ) ;
40- expect ( service ) . to . match ( / T e s t i n g N e w S e r v i c e = B a s e S e r v i c e .e x t e n d \( \{ / ) ;
41- expect ( service ) . to . match ( / T e s t i n g N e w S e r v i c e \. i n s t a n c e = n e w T e s t i n g N e w S e r v i c e \( s e q u e l i z e \) ; / ) ;
42- expect ( service ) . to . match ( / T e s t i n g N e w S e r v i c e \. M o d e l = O R M T e s t i n g N e w M o d e l ; / ) ;
43- expect ( service ) . to . match ( / r e t u r n T e s t i n g N e w S e r v i c e \. i n s t a n c e ; / ) ;
35+ expect ( service ) . to . match ( / m o d u l e \. e x p o r t s = f u n c t i o n \( S e r v i c e , T e s t i n g N e w M o d e l \) \{ / ) ;
36+ expect ( service ) . to . match ( / r e t u r n S e r v i c e \. e x t e n d \( \{ / ) ;
37+ expect ( service ) . to . match ( / m o d e l \: T e s t i n g N e w M o d e l / ) ;
4438
4539 var task = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'tasks' , 'TestingNewTask.js' ) ) ;
4640 expect ( task ) . to . match ( / v a r T e s t i n g N e w T a s k = m o d u l e \. e x p o r t s = C l a s s \. e x t e n d \( / ) ;
@@ -52,13 +46,10 @@ describe( 'New (backend seed)', function ( ) {
5246 expect ( testInt ) . to . match ( / d e s c r i b e \( ' G E T \/ t e s t i n g _ n e w \/ : i d ' , f u n c t i o n \( \) \{ / ) ;
5347 expect ( testInt ) . to . match ( / d e s c r i b e \( ' P U T \/ t e s t i n g _ n e w \/ : i d ' , f u n c t i o n \( \) \{ / ) ;
5448 expect ( testInt ) . to . match ( / d e s c r i b e \( ' D E L E T E \/ t e s t i n g _ n e w \/ : i d ' , f u n c t i o n \( \) \{ / ) ;
55- expect ( testInt ) . to . match ( / d e s c r i b e \( ' G E T \/ t e s t i n g _ n e w \/ c u s t o m ' , f u n c t i o n \( \) \{ / ) ;
56- expect ( testInt ) . to . match ( / m e s s a g e : ' H e l l o f r o m c u s t o m A c t i o n i n s i d e T e s t i n g N e w C o n t r o l l e r ' / ) ;
5749
5850 var testUnit = fs . readFileSync ( path . join ( assetPath , 'my-new-project' , 'backend' , 'modules' , 'TestingNew' , 'tests' , 'unit' , 'TestingNewTest.js' ) ) ;
5951 expect ( testUnit ) . to . match ( / d e s c r i b e \( ' c o n t r o l l e r s \. T e s t i n g N e w C o n t r o l l e r ' , f u n c t i o n \( \) \{ / ) ;
6052 expect ( testUnit ) . to . match ( / t e s t E n v \( f u n c t i o n \( T e s t i n g N e w C o n t r o l l e r , T e s t i n g N e w S e r v i c e \) \{ / ) ;
61- expect ( testUnit ) . to . match ( / m e s s a g e : ' H e l l o f r o m c u s t o m A c t i o n i n s i d e T e s t i n g N e w C o n t r o l l e r ' / ) ;
6253
6354 done ( err ) ;
6455 } ) ;
0 commit comments