File tree Expand file tree Collapse file tree 2 files changed +0
-35
lines changed
Expand file tree Collapse file tree 2 files changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,6 @@ export default class IdentityRoute extends Route {
1010 @service login ;
1111 @service fastboot ;
1212
13- beforeModel ( transition ) {
14- if ( transition ?. to ?. queryParams ?. dev !== 'true' ) {
15- this . router . transitionTo ( '/page-not-found' ) ;
16- }
17- }
18-
1913 async model ( ) {
2014 if ( this . fastboot . isFastBoot ) {
2115 return null ;
Original file line number Diff line number Diff line change @@ -25,35 +25,6 @@ module('Unit | Route | identity', function (hooks) {
2525 assert . ok ( this . route ) ;
2626 } ) ;
2727
28- test ( 'beforeModel redirects to page-not-found when dev param is not true' , function ( assert ) {
29- const transition = {
30- to : {
31- queryParams : {
32- dev : 'false' ,
33- } ,
34- } ,
35- } ;
36-
37- this . route . beforeModel ( transition ) ;
38- assert . ok (
39- this . route . router . transitionTo . calledWith ( '/page-not-found' ) ,
40- 'should redirect to page-not-found' ,
41- ) ;
42- } ) ;
43-
44- test ( 'beforeModel allows navigation when dev param is true' , function ( assert ) {
45- const transition = {
46- to : {
47- queryParams : {
48- dev : 'true' ,
49- } ,
50- } ,
51- } ;
52-
53- this . route . beforeModel ( transition ) ;
54- assert . notOk ( this . route . router . transitionTo . called , 'should not redirect' ) ;
55- } ) ;
56-
5728 test ( 'model returns null in FastBoot' , async function ( assert ) {
5829 this . route . fastboot . isFastBoot = true ;
5930 const result = await this . route . model ( ) ;
You can’t perform that action at this time.
0 commit comments