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.verifyNoOutstandingRequest fails to throw when digest is not triggered #13506

Closed
@katemihalikova

Description

@katemihalikova

Overview of the Issue
In unit test, I use $httpBackend.verifyNoOutstandingRequest(); to make sure that no request was done. The test also passes when the request is done, because verifyNoOutstandingRequest does not trigger digest (in contrary to flush and verifyNoOutstandingExpectation) which leads to unpropagated Unexpected request error.
There is a comment asking whether calling digest should be added to verifyNoOutstandingRequest as well, but with no response.

Use Case - testing that $http request is not being done
Angular Version - 1.4.8
Reproduce the Error

    it('should not allow submitting invalid form', function() {
        var ctrl = createCtrl();
        ctrl.submit();
        $httpBackend.verifyNoOutstandingRequest();
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions