docs(http): fix "Expecting and answering requests" example mistake
Possibly overlooked testing documentation mistake fixed: - `http.get('/data')` probably ought to be paired with `httpMock.expectOne('/data')` instead of `httpMock.expectOne('/data')`.
This commit is contained in:
parent
8c81c62d46
commit
47b3ecd9a3
|
@ -598,7 +598,7 @@ it('expects a GET request', inject([HttpClient, HttpTestingController], (http: H
|
||||||
|
|
||||||
// At this point, the request is pending, and no response has been
|
// At this point, the request is pending, and no response has been
|
||||||
// sent. The next step is to expect that the request happened.
|
// sent. The next step is to expect that the request happened.
|
||||||
const req = httpMock.expectOne('/test');
|
const req = httpMock.expectOne('/data');
|
||||||
|
|
||||||
// If no request with that URL was made, or if multiple requests match,
|
// If no request with that URL was made, or if multiple requests match,
|
||||||
// expectOne() would throw. However this test makes only one request to
|
// expectOne() would throw. However this test makes only one request to
|
||||||
|
|
Loading…
Reference in New Issue