mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
refactor: introduce concept of durations (resolve #261)
This commit is contained in:
16
mocks/duration_service.go
Normal file
16
mocks/duration_service.go
Normal file
@ -0,0 +1,16 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"github.com/muety/wakapi/models"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DurationServiceMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *DurationServiceMock) Get(time time.Time, time2 time.Time, user *models.User) ([]*models.Duration, error) {
|
||||
args := m.Called(time, time2, user)
|
||||
return args.Get(0).([]*models.Duration), args.Error(1)
|
||||
}
|
Reference in New Issue
Block a user