refactor(orm)!: refactor hooks into validate and write hooks (#11185)

* refactor(orm)!: refactor hooks into validate and write hooks

* impl and tests

* docs

* update mock hooks and tests

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Aaron Craelius
2022-02-25 14:54:44 +01:00
committed by GitHub
co-authored by Marko
parent c686634819
commit 57b46134a9
15 changed files with 393 additions and 147 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
// Package ormmocks contains generated mocks for orm types that can be used
// in testing. Right now, this package only contains a mock for ormtable.Hooks
// in testing. Right now, this package only contains a mock for ormtable.ValidateHooks
// as this useful way for unit testing using an in-memory database. Rather
// than attempting to mock a whole table or database instance, instead
// a mock Hook instance can be passed in to verify that the expected
@@ -9,5 +9,5 @@
// be used in gomock EXPECT functions.
//
// See TestHooks in ormdb/module_test.go for examples of how to use
// mock Hooks in a real-world scenario.
// mock ValidateHooks in a real-world scenario.
package ormmocks