angular-http-auth
angular-http-auth copied to clipboard
[WIP] Add tests
trafficstars
Work in progress:
- [x] Add Karma test runner
- [x] Refactor injected interceptor to a separate service (
requestService) for easier testing - [x] Test that injecting said service works
- [ ] Test that
authServicecan be initialised - [ ] Test that
httpBuffercan be initialised - [x] Test that invoking
loginConfirmedandloginCancelledbroadcasts events - [ ] Test that invoking
loginConfirmedandloginCancelledbroadcasts events withdata - [ ] Test that
httpBuffer's methodsretryAll,rejectAll, andappendwork - [x] Test that everything works via
$httpusing (mock using $httpBackend)
Not sure when I'll have time next time with this, so if anyone feels like continuing from here, do it! :-)
Ah, damn, noticed only now #69 — will look into combining these.
Included event tests by @nils-wisiol from #69