@@ -149,6 +149,64 @@ describe('Blueprint: route', function () {
149
149
} ) ;
150
150
} ) ;
151
151
152
+ it ( 'route foo --route-authoring-format strict' , function ( ) {
153
+ return emberGenerateDestroy (
154
+ [ 'route' , 'foo' , '--route-authoring-format' , 'strict' ] ,
155
+ ( _file ) => {
156
+ expect ( _file ( 'app/routes/foo.js' ) ) . to . equal ( fixture ( 'route/route.js' ) ) ;
157
+
158
+ expect ( _file ( 'app/templates/foo.gjs' ) ) . to . equal (
159
+ fixture ( 'route/strict-route-template.gjs' )
160
+ ) ;
161
+ expect ( _file ( 'app/templates/foo.hbs' ) ) . to . not . exist ;
162
+
163
+ expect ( _file ( 'tests/unit/routes/foo-test.js' ) ) . to . equal ( fixture ( 'route-test/default.js' ) ) ;
164
+
165
+ expect ( file ( 'app/router.js' ) ) . to . contain ( "this.route('foo')" ) ;
166
+ }
167
+ ) ;
168
+ } ) ;
169
+
170
+ it ( 'route foo --strict' , function ( ) {
171
+ return emberGenerateDestroy ( [ 'route' , 'foo' , '--strict' ] , ( _file ) => {
172
+ expect ( _file ( 'app/routes/foo.js' ) ) . to . equal ( fixture ( 'route/route.js' ) ) ;
173
+
174
+ expect ( _file ( 'app/templates/foo.gjs' ) ) . to . equal ( fixture ( 'route/strict-route-template.gjs' ) ) ;
175
+ expect ( _file ( 'app/templates/foo.hbs' ) ) . to . not . exist ;
176
+
177
+ expect ( _file ( 'tests/unit/routes/foo-test.js' ) ) . to . equal ( fixture ( 'route-test/default.js' ) ) ;
178
+
179
+ expect ( file ( 'app/router.js' ) ) . to . contain ( "this.route('foo')" ) ;
180
+ } ) ;
181
+ } ) ;
182
+
183
+ it ( 'route foo --route-authoring-format loose' , function ( ) {
184
+ return emberGenerateDestroy (
185
+ [ 'route' , 'foo' , '--route-authoring-format' , 'loose' ] ,
186
+ ( _file ) => {
187
+ expect ( _file ( 'app/routes/foo.js' ) ) . to . equal ( fixture ( 'route/route.js' ) ) ;
188
+
189
+ expect ( _file ( 'app/templates/foo.hbs' ) ) . to . equal ( '{{page-title "Foo"}}\n{{outlet}}' ) ;
190
+
191
+ expect ( _file ( 'tests/unit/routes/foo-test.js' ) ) . to . equal ( fixture ( 'route-test/default.js' ) ) ;
192
+
193
+ expect ( file ( 'app/router.js' ) ) . to . contain ( "this.route('foo')" ) ;
194
+ }
195
+ ) ;
196
+ } ) ;
197
+
198
+ it ( 'route foo --loose' , function ( ) {
199
+ return emberGenerateDestroy ( [ 'route' , 'foo' , '--loose' ] , ( _file ) => {
200
+ expect ( _file ( 'app/routes/foo.js' ) ) . to . equal ( fixture ( 'route/route.js' ) ) ;
201
+
202
+ expect ( _file ( 'app/templates/foo.hbs' ) ) . to . equal ( '{{page-title "Foo"}}\n{{outlet}}' ) ;
203
+
204
+ expect ( _file ( 'tests/unit/routes/foo-test.js' ) ) . to . equal ( fixture ( 'route-test/default.js' ) ) ;
205
+
206
+ expect ( file ( 'app/router.js' ) ) . to . contain ( "this.route('foo')" ) ;
207
+ } ) ;
208
+ } ) ;
209
+
152
210
it ( 'route foo --pod' , function ( ) {
153
211
return emberGenerateDestroy ( [ 'route' , 'foo' , '--pod' ] , ( _file ) => {
154
212
expect ( _file ( 'app/foo.js/route.js' ) ) . to . not . exist ;
0 commit comments