auth_handler.go: fix lint error
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
parent
3a943a3b9a
commit
8321773a22
@ -637,12 +637,13 @@ func TestAuthorizationEndpoint(t *testing.T) {
|
||||
require.Empty(t, rsp.Header().Values("Location"))
|
||||
}
|
||||
|
||||
if test.wantBodyJSON != "" {
|
||||
switch {
|
||||
case test.wantBodyJSON != "":
|
||||
require.JSONEq(t, test.wantBodyJSON, rsp.Body.String())
|
||||
} else if test.wantBodyStringWithLocationInHref {
|
||||
case test.wantBodyStringWithLocationInHref:
|
||||
anchorTagWithLocationHref := fmt.Sprintf("<a href=\"%s\">Found</a>.\n\n", html.EscapeString(actualLocation))
|
||||
require.Equal(t, anchorTagWithLocationHref, rsp.Body.String())
|
||||
} else {
|
||||
default:
|
||||
require.Equal(t, test.wantBodyString, rsp.Body.String())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user