Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 52ad819

Browse files
committed
docs(ngMock/ngMockE2E.$httpBackend): fix method name to matchLatestDefinitionEnabled
See #16702
1 parent d86f6be commit 52ad819

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ngMock/angular-mocks.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,20 +1619,20 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
16191619

16201620
/**
16211621
* @ngdoc method
1622-
* @name $httpBackend#matchLatestDefinition
1622+
* @name $httpBackend#matchLatestDefinitionEnabled
16231623
* @description
16241624
* This method can be used to change which mocked responses `$httpBackend` returns, when defining
16251625
* them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
16261626
* By default, `$httpBackend` returns the first definition that matches. When setting
1627-
* `$http.matchLatestDefinition(true)`, it will use the last response that matches, i.e. the
1627+
* `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
16281628
* one that was added last.
16291629
*
16301630
* ```js
16311631
* hb.when('GET', '/url1').respond(200, 'content', {});
16321632
* hb.when('GET', '/url1').respond(201, 'another', {});
16331633
* hb('GET', '/url1'); // receives "content"
16341634
*
1635-
* $http.matchLatestDefinition(true)
1635+
* $http.matchLatestDefinitionEnabled(true)
16361636
* hb('GET', '/url1'); // receives "another"
16371637
*
16381638
* hb.when('GET', '/url1').respond(201, 'onemore', {});
@@ -1641,7 +1641,7 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
16411641
*
16421642
* This is useful if a you have a default response that is overriden inside specific tests.
16431643
*
1644-
* Note that different from config methods on providers, `matchLatestDefinition()` can be changed
1644+
* Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
16451645
* even when the application is already running.
16461646
*
16471647
* @param {Boolean=} value value to set, either `true` or `false`. Default is `false`.
@@ -2919,21 +2919,21 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
29192919
*/
29202920
/**
29212921
* @ngdoc method
2922-
* @name $httpBackend#matchLatestDefinition
2922+
* @name $httpBackend#matchLatestDefinitionEnabled
29232923
* @module ngMockE2E
29242924
* @description
29252925
* This method can be used to change which mocked responses `$httpBackend` returns, when defining
29262926
* them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
29272927
* By default, `$httpBackend` returns the first definition that matches. When setting
2928-
* `$http.matchLatestDefinition(true)`, it will use the last response that matches, i.e. the
2928+
* `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
29292929
* one that was added last.
29302930
*
29312931
* ```js
29322932
* hb.when('GET', '/url1').respond(200, 'content', {});
29332933
* hb.when('GET', '/url1').respond(201, 'another', {});
29342934
* hb('GET', '/url1'); // receives "content"
29352935
*
2936-
* $http.matchLatestDefinition(true)
2936+
* $http.matchLatestDefinitionEnabled(true)
29372937
* hb('GET', '/url1'); // receives "another"
29382938
*
29392939
* hb.when('GET', '/url1').respond(201, 'onemore', {});
@@ -2942,7 +2942,7 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
29422942
*
29432943
* This is useful if a you have a default response that is overriden inside specific tests.
29442944
*
2945-
* Note that different from config methods on providers, `matchLatestDefinition()` can be changed
2945+
* Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
29462946
* even when the application is already running.
29472947
*
29482948
* @param {Boolean=} value value to set, either `true` or `false`. Default is `false`.

0 commit comments

Comments
 (0)