angular/angular.dart — pull request #1206 by vsavkin (2014-07-03 16:08:45+00:00)
Title: feat(mocks): change MockHttpBackend to define assertions 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