mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-18 07:53:04 +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
|
@ -113,13 +113,13 @@ func TestGetDiffPreview(t *testing.T) {
|
|||
|
||||
t.Run("with given branch", func(t *testing.T) {
|
||||
diff, err := GetDiffPreview(ctx.Repo.Repository, branch, treePath, content)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, expectedDiff, diff)
|
||||
})
|
||||
|
||||
t.Run("empty branch, same results", func(t *testing.T) {
|
||||
diff, err := GetDiffPreview(ctx.Repo.Repository, "", treePath, content)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, expectedDiff, diff)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue