mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-31 13:02:52 +09:00
prefer NoError/Error over Nil/NotNil (#12271)
This commit is contained in:
@ -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)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user