fix: change test case name

This commit is contained in:
mr-chenguang lcgash 2024-04-15 03:10:04 +00:00
parent c8ccb9c3cc
commit 1c02efdff7

View File

@ -206,7 +206,7 @@ func TestFind(t *testing.T) {
}
})
t.Run("NotFoundAsNil", func(t *testing.T) {
t.Run("KeepResultAsNil", func(t *testing.T) {
var first *User
if err := DB.Where("name = ?", "find not found").First(&first).Error; err != nil {
AssertEqual(t, err, gorm.ErrRecordNotFound)