improve test coverage

This commit is contained in:
Nicola Murino 2021-05-23 22:29:55 +02:00
parent 50e441849a
commit 15cde2dd1a
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB

View file

@ -2764,11 +2764,16 @@ func TestProviderErrors(t *testing.T) {
assert.NoError(t, err)
err = os.Remove(backupFilePath)
assert.NoError(t, err)
req, err := http.NewRequest(http.MethodGet, webUserPath+"?clone-from=user", nil)
req, err := http.NewRequest(http.MethodGet, webUserPath, nil)
assert.NoError(t, err)
setJWTCookieForReq(req, testServerToken)
rr := executeRequest(req)
checkResponseCode(t, http.StatusInternalServerError, rr)
req, err = http.NewRequest(http.MethodGet, webUserPath+"?clone-from=user", nil)
assert.NoError(t, err)
setJWTCookieForReq(req, testServerToken)
rr = executeRequest(req)
checkResponseCode(t, http.StatusInternalServerError, rr)
req, err = http.NewRequest(http.MethodGet, webTemplateUser+"?from=auser", nil)
assert.NoError(t, err)
setJWTCookieForReq(req, testServerToken)