Unit testing AngularJS with $httpBackend gives “Error: Unexpected Request”
问题 I'm gonna preface this question by saying I've already gotten a test to work for my "LoginCtrl" which performs almost the exact same task. I'm sure this is an issue of something really small I've overlooked. Thanks in advance for any help :) I've set the expected value/response for httpBackend for my test, but when I run httpBackend.flush() , it's as if I never set the expectation. Testing code: describe('user register', function () { var scope, RegisterCtrl, httpBackend, userJohnDoe,