Hey there
I am currently working on setting up jasmine-karma unit tests for my angular app. The problem arises in my app.js file where the module.run method is calling a custom service (LoginService) that then makes a call to the $http service. The issue I'm facing is that I am testing the LoginService and mocking the $http service, but when I try to flush, it gives me this error:
Error: Unexpected request: GET /frontend/login
No more request expected
I suspect that this additional request is generated by the module.run function.
app.run(['LoginService',function(LoginService){
LoginService.checkLoginStatus().then(function(status){
console.log(status);
}, function(status){
console.log(false);
});
}]);
You can check out my code on Plunkr here: http://plnkr.co/edit/f9bEH1fNTxDoxvWfajH5