Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
feat(mocks): change MockHttpBackend to define the assertion on flush.
Browse files Browse the repository at this point in the history
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
vsavkin authored and Victor Savkin committed Sep 11, 2014
1 parent 8fd840e commit f441051
Show file tree
Hide file tree
Showing 3 changed files with 336 additions and 138 deletions.
Loading

0 comments on commit f441051

Please sign in to comment.