prefer NoError/Error over Nil/NotNil (#12271)

This commit is contained in:
Stephen Solka 2020-07-19 05:53:40 -04:00 committed by GitHub
parent b609a25014
commit 54513452a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 34 deletions

View file

@ -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)
})
}