forked from forgejo/forgejo
API error cleanup (#7186)
This commit is contained in:
parent
744fd6a1c8
commit
8f0182c322
7 changed files with 16 additions and 25 deletions
|
@ -11,8 +11,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -102,7 +102,7 @@ func TestAPIDeleteFile(t *testing.T) {
|
|||
resp = session.MakeRequest(t, req, http.StatusInternalServerError)
|
||||
expectedAPIError := context.APIError{
|
||||
Message: "sha does not match [given: " + deleteFileOptions.SHA + ", expected: " + correctSHA + "]",
|
||||
URL: base.DocURL,
|
||||
URL: setting.API.SwaggerURL,
|
||||
}
|
||||
var apiError context.APIError
|
||||
DecodeJSON(t, resp, &apiError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue