@@ -10,34 +10,16 @@ module('Unit | Route | mobile', function (hooks) {
1010 hooks . beforeEach ( function ( ) {
1111 this . fetchStub = sinon . stub ( window , 'fetch' ) ;
1212 this . route = this . owner . lookup ( 'route:mobile' ) ;
13- sinon . stub ( this . route . router , 'transitionTo' ) ;
1413 } ) ;
1514
1615 hooks . afterEach ( function ( ) {
1716 this . fetchStub . restore ( ) ;
18- sinon . restore ( ) ;
1917 } ) ;
2018
21- test ( 'redirects to 404 page if dev flag is not present' , function ( assert ) {
22- const transition = { to : { queryParams : { dev : 'false' } } } ;
23-
24- this . route . beforeModel ( transition ) ;
25-
26- assert . ok (
27- this . route . router . transitionTo . calledOnceWith ( '/page-not-found' ) ,
28- 'Redirected to /page-not-found when dev is not true' ,
29- ) ;
30- } ) ;
31-
32- test ( 'allows access when dev flag is true' , function ( assert ) {
33- const transition = { to : { queryParams : { dev : 'true' } } } ;
34-
35- this . route . beforeModel ( transition ) ;
36-
37- assert . ok (
38- this . route . router . transitionTo . notCalled ,
39- 'No redirection occurs when dev query param is true' ,
40- ) ;
19+ test ( 'mobile route exists and is accessible' , function ( assert ) {
20+ assert . expect ( 1 ) ;
21+ const route = this . owner . lookup ( 'route:mobile' ) ;
22+ assert . ok ( route , 'The mobile route exists' ) ;
4123 } ) ;
4224
4325 test ( 'it fetches user profile and returns userId if API responds with 200' , async function ( assert ) {
0 commit comments