@mikkelvp wrote:
Hi
I am trying to create unit tests for my app. Testing a controller, when calling $scope.$apply (to resolve promises), my test fails:
Error: Unexpected request: GET app/login/login.html No more request expected at $httpBackend (E:/mood/www/lib/angular-mocks/angular-mocks.js:1210:9) at sendReq (E:/mood/www/lib/ionic/js/ionic.bundle.js:19165:9) at serverRequest (E:/mood/www/lib/ionic/js/ionic.bundle.js:18877:16) at processQueue (E:/mood/www/lib/ionic/js/ionic.bundle.js:23399:28) at E:/mood/www/lib/ionic/js/ionic.bundle.js:23415:27 at Scope.$eval (E:/mood/www/lib/ionic/js/ionic.bundle.js:24678:28) at Scope.$digest (E:/mood/www/lib/ionic/js/ionic.bundle.js:24489:31) at Scope.$apply (E:/mood/www/lib/ionic/js/ionic.bundle.js:24783:24) at Object.<anonymous> (E:/mood/www/app/mood/moodCtrl.unit.spec.js:112:16)
The app uses Firebase and mockfirebase for testing. But it does not seem to be due to $requireAuth not resolving and switching $state to login.
Why does $state change to login? How can i figure out what triggers the $state switch?
Posts: 1
Participants: 1