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

$httpBackend expectations with undefined URL #8442

Closed
@Kapaacius

Description

@Kapaacius

Using : Angular-1.3.0-beta.17

$httpBackend.expect methods return true when URL is undefined or missing, even though the documentation states that the URL is not optional.

This is because of the following code in angular-mocks.js (class MockHttpExpectation):

this.matchUrl = function(u) {
    if (!url) return true;

A Plunkr to illustrate the point: http://plnkr.co/edit/k1bntn?p=preview

Is this an undocumented feature or a bug?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions