httpd: add a test case for StripSlash middleware
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
da0eb5037e
commit
63972edb96
1 changed files with 6 additions and 0 deletions
|
@ -22881,6 +22881,12 @@ func TestNameParamSingleSlash(t *testing.T) {
|
|||
groupGet, _, err := httpdtest.GetGroupByName(group.Name, http.StatusOK)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "/", groupGet.Name)
|
||||
// check strip slash
|
||||
req, err = http.NewRequest(http.MethodGet, webGroupsPath+"/", nil)
|
||||
assert.NoError(t, err)
|
||||
setJWTCookieForReq(req, webToken)
|
||||
rr = executeRequest(req)
|
||||
checkResponseCode(t, http.StatusOK, rr)
|
||||
// cleanup
|
||||
req, err = http.NewRequest(http.MethodDelete, groupPath+"/"+url.PathEscape(group.Name), nil)
|
||||
assert.NoError(t, err)
|
||||
|
|
Loading…
Reference in a new issue