| Index: third_party/pkg/angular/test/mock/http_backend_spec.dart
|
| diff --git a/third_party/pkg/angular/test/mock/http_backend_spec.dart b/third_party/pkg/angular/test/mock/http_backend_spec.dart
|
| index e89e5c74c0523ada9e3ceecf3129b0c1bb2c91a0..65ff89b1941bcb09abca7ee02090016e374b6272 100644
|
| --- a/third_party/pkg/angular/test/mock/http_backend_spec.dart
|
| +++ b/third_party/pkg/angular/test/mock/http_backend_spec.dart
|
| @@ -42,6 +42,23 @@ main() => describe('MockHttpBackend', () {
|
| });
|
|
|
|
|
| + it('should respond with JSON', inject((Logger logger) {
|
| + hb.when('GET', '/url1').respond(200, ['abc'], {});
|
| + hb.when('GET', '/url2').respond(200, {'key': 'value'}, {});
|
| +
|
| +
|
| + callback.andCallFake((status, response) {
|
| + expect(status).toBe(200);
|
| + logger(response);
|
| + });
|
| +
|
| + hb('GET', '/url1', null, callback);
|
| + hb('GET', '/url2', null, callback);
|
| + hb.flush();
|
| + expect(logger).toEqual(['["abc"]', '{"key":"value"}']);
|
| + }));
|
| +
|
| +
|
| it('should throw error when unexpected request', () {
|
| hb.when('GET', '/url1').respond(200, 'content');
|
| expect(() {
|
|
|