Skip to content

assert.HTTP(Success|Redirect|Error) do not fail tests; they are inconsistent with other assert.* functions #379

@kwojcik

Description

@kwojcik

HTTPSuccess, HTTPRedirect, and HTTPError do not Fail tests even though the docs use the same wording as HTTPBodyContains and HTTPBodyNotContains which do Fail tests.

In order to properly use them now, one must do this:

assert.True(t, assert.HTTPError(t, ...))

In order to be consistent with the rest of the assert package, they should Fail tests so that they are used like:

assert.HTTPError(t, ...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions