angular-http-auth
angular-http-auth copied to clipboard
[WIP] Add tests
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
authService
can be initialised - [ ] Test that
httpBuffer
can be initialised - [x] Test that invoking
loginConfirmed
andloginCancelled
broadcasts events - [ ] Test that invoking
loginConfirmed
andloginCancelled
broadcasts events withdata
- [ ] Test that
httpBuffer
's methodsretryAll
,rejectAll
, andappend
work - [x] Test that everything works via
$http
using (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