mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
prefer NoError/Error over Nil/NotNil (#12271)
This commit is contained in:
parent
b609a25014
commit
54513452a1
11 changed files with 34 additions and 34 deletions
|
@ -80,7 +80,7 @@ func testDeleteRepoFile(t *testing.T, u *url.URL) {
|
|||
|
||||
t.Run("Delete README.md file", func(t *testing.T) {
|
||||
fileResponse, err := repofiles.DeleteRepoFile(repo, doer, opts)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
expectedFileResponse := getExpectedDeleteFileResponse(u)
|
||||
assert.NotNil(t, fileResponse)
|
||||
assert.Nil(t, fileResponse.Content)
|
||||
|
@ -122,7 +122,7 @@ func testDeleteRepoFileWithoutBranchNames(t *testing.T, u *url.URL) {
|
|||
|
||||
t.Run("Delete README.md without Branch Name", func(t *testing.T) {
|
||||
fileResponse, err := repofiles.DeleteRepoFile(repo, doer, opts)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
expectedFileResponse := getExpectedDeleteFileResponse(u)
|
||||
assert.NotNil(t, fileResponse)
|
||||
assert.Nil(t, fileResponse.Content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue