mirror of
https://github.com/muety/wakapi.git
synced 2025-12-06 06:22:41 -08:00
chore: add check for sqlite cascades before changing user id
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type AliasRepositoryMock struct {
|
||||
BaseRepositoryMock
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
|
||||
24
mocks/base_repository.go
Normal file
24
mocks/base_repository.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type BaseRepositoryMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *BaseRepositoryMock) GetDialector() string {
|
||||
args := m.Called()
|
||||
return args.Get(0).(string)
|
||||
}
|
||||
|
||||
func (m *BaseRepositoryMock) GetTableDDLMysql(s string) (string, error) {
|
||||
args := m.Called(s)
|
||||
return args.Get(0).(string), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *BaseRepositoryMock) GetTableDDLSqlite(s string) (string, error) {
|
||||
args := m.Called(s)
|
||||
return args.Get(0).(string), args.Error(1)
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type SummaryRepositoryMock struct {
|
||||
BaseRepositoryMock
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user