From d8a2c8ab7b17061ea638f7a460aeb69750cda008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=A4=9A?= Date: Sun, 29 Sep 2019 09:52:51 +0800 Subject: [PATCH] update nil --- session_delete_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session_delete_test.go b/session_delete_test.go index c4f62cec..70a8cf42 100644 --- a/session_delete_test.go +++ b/session_delete_test.go @@ -248,7 +248,7 @@ func TestSoftDeleted(t *testing.T) { DeletedAt int64 `xorm:"not null default '0' comment('删除状态') deleted "` } testEngine.SetSoftDeleteHandler(&DefaultSoftDeleteHandler{}) - + defer testEngine.SetSoftDeleteHandler(nil) err := testEngine.DropTables(&Deleted{}) assert.NoError(t, err) @@ -326,4 +326,5 @@ func TestSoftDeleted(t *testing.T) { Or("`"+testEngine.GetColumnMapper().Obj2Table("Id")+"` = ?", 3).Find(&records3) assert.NoError(t, err) assert.EqualValues(t, 2, len(records3)) + }