tweaked automigrate to check for git status and extracted the base flags from the plugins

This commit is contained in:
Gani Georgiev
2022-11-26 22:33:27 +02:00
parent 8c9b657132
commit 675d459137
11 changed files with 170 additions and 367 deletions
+6 -6
View File
@@ -18,7 +18,13 @@ type TestApp struct {
// EventCalls defines a map to inspect which app events
// (and how many times) were triggered.
//
// The following events are not counted because they execute always:
// - OnBeforeBootstrap
// - OnAfterBootstrap
// - OnBeforeServe
EventCalls map[string]int
TestMailer *TestMailer
}
@@ -81,12 +87,6 @@ func NewTestApp(optTestDataDir ...string) (*TestApp, error) {
TestMailer: &TestMailer{},
}
// no need to count since this is executed always
// t.OnBeforeServe().Add(func(e *core.ServeEvent) error {
// t.EventCalls["OnBeforeServe"]++
// return nil
// })
t.OnModelBeforeCreate().Add(func(e *core.ModelEvent) error {
t.EventCalls["OnModelBeforeCreate"]++
return nil