mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Make MockRepo names more consistent
This commit is contained in:
parent
779571a086
commit
110e17b004
12 changed files with 79 additions and 47 deletions
|
@ -2,19 +2,19 @@ package tests
|
|||
|
||||
import "github.com/navidrome/navidrome/model"
|
||||
|
||||
type mockedPropertyRepo struct {
|
||||
type MockedPropertyRepo struct {
|
||||
model.UserRepository
|
||||
data map[string]string
|
||||
err error
|
||||
}
|
||||
|
||||
func (p *mockedPropertyRepo) init() {
|
||||
func (p *MockedPropertyRepo) init() {
|
||||
if p.data == nil {
|
||||
p.data = make(map[string]string)
|
||||
}
|
||||
}
|
||||
|
||||
func (p *mockedPropertyRepo) Put(id string, value string) error {
|
||||
func (p *MockedPropertyRepo) Put(id string, value string) error {
|
||||
if p.err != nil {
|
||||
return p.err
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ func (p *mockedPropertyRepo) Put(id string, value string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *mockedPropertyRepo) Get(id string) (string, error) {
|
||||
func (p *MockedPropertyRepo) Get(id string) (string, error) {
|
||||
if p.err != nil {
|
||||
return "", p.err
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ func (p *mockedPropertyRepo) Get(id string) (string, error) {
|
|||
return "", model.ErrNotFound
|
||||
}
|
||||
|
||||
func (p *mockedPropertyRepo) DefaultGet(id string, defaultValue string) (string, error) {
|
||||
func (p *MockedPropertyRepo) DefaultGet(id string, defaultValue string) (string, error) {
|
||||
if p.err != nil {
|
||||
return "", p.err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue