From da3b864e2477afd7c6c93a936a11e503567b8903 Mon Sep 17 00:00:00 2001 From: Roy Reznik Date: Tue, 5 May 2020 23:36:42 +0300 Subject: [PATCH] Fix tests --- callbacks_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/callbacks_test.go b/callbacks_test.go index bebd0e38..62cb1660 100644 --- a/callbacks_test.go +++ b/callbacks_test.go @@ -98,12 +98,12 @@ func TestRunCallbacks(t *testing.T) { } DB.Where("Code = ?", "unique_code").First(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 1, 1, 0, 0, 0, 0, 2}) { + if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 0, 1, 0, 0, 0, 0, 2}) { t.Errorf("After update callbacks values are not saved, %v", p.GetCallTimes()) } DB.Delete(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 1, 1, 0, 0, 1, 1, 2}) { + if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 0, 1, 0, 0, 1, 1, 2}) { t.Errorf("After delete callbacks should be invoked successfully, %v", p.GetCallTimes()) }