navidrome/tests/mock_share_repo.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
468 B
Go
Raw Normal View History

2021-06-08 22:30:19 +02:00
package tests
import (
"github.com/deluan/rest"
"github.com/navidrome/navidrome/model"
)
type MockShareRepo struct {
model.ShareRepository
rest.Repository
rest.Persistable
Entity interface{}
Cols []string
Err error
}
func (m *MockShareRepo) Save(entity interface{}) (string, error) {
m.Entity = entity
return "id", m.Err
}
func (m *MockShareRepo) Update(entity interface{}, cols ...string) error {
m.Entity = entity
m.Cols = cols
return m.Err
}