diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index ef038082eb66..aa2e032247d1 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -889,6 +889,17 @@ describe('ngMock', function() { expect(typeof hb.expectHEAD).toBe("function"); }); + + it('should provide "when" methods for each HTTP verb', function() { + expect(typeof hb.whenGET).toBe("function"); + expect(typeof hb.whenPOST).toBe("function"); + expect(typeof hb.whenPUT).toBe("function"); + expect(typeof hb.whenPATCH).toBe("function"); + expect(typeof hb.whenDELETE).toBe("function"); + expect(typeof hb.whenHEAD).toBe("function"); + }); + + it('should respond with first matched definition', function() { hb.when('GET', '/url1').respond(200, 'content', {}); hb.when('GET', '/url1').respond(201, 'another', {});