angular-http-auth icon indicating copy to clipboard operation
angular-http-auth copied to clipboard

[WIP] Add tests

Open simison opened this issue 8 years ago • 3 comments

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 and loginCancelled broadcasts events
  • [ ] Test that invoking loginConfirmed and loginCancelled broadcasts events with data
  • [ ] Test that httpBuffer's methods retryAll, rejectAll, and append 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! :-)

simison avatar Nov 15 '16 09:11 simison

Ah, damn, noticed only now #69 — will look into combining these.

simison avatar Nov 15 '16 10:11 simison

Included event tests by @nils-wisiol from #69

simison avatar Nov 15 '16 10:11 simison