mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
test: add essential unit tests for core functionality (resolve #6)
This commit is contained in:
15
mocks/alias_repository.go
Normal file
15
mocks/alias_repository.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"github.com/muety/wakapi/models"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type AliasRepositoryMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *AliasRepositoryMock) GetByUser(s string) ([]*models.Alias, error) {
|
||||
args := m.Called(s)
|
||||
return args.Get(0).([]*models.Alias), args.Error(1)
|
||||
}
|
Reference in New Issue
Block a user