Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
demoManito committed Aug 26, 2024
1 parent 86a95e5 commit 158e86c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,10 @@ type UserUpdate struct {
Name string `gorm:"column:name"`
}

func (UserUpdate) TableName() string {
return "user_updates"
}

func (up *UserUpdate) BeforeUpdate(tx *gorm.DB) error {
up.Version++
return nil
Expand Down

0 comments on commit 158e86c

Please sign in to comment.