This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mocks): change MockHttpBackend to define the assertion on flush.
Add new methods (`flushGET`, `flushPOST`, etc) to the `MockHttpBackend` class to allow defining assertions on flush. These methods add a new expectation and then flush all the pending requests until they find the one matching the expectation. BREAKING CHANGE: Unexpected requests are detected only when `flush` is called. Before: backend("GET", /some"); //throws here if `/some` has not been defined After: backend("GET", /some"); //no problem, just records the request backend.flush(); //throws here Closes #900
- Loading branch information