Make MockRepo names more consistent

This commit is contained in:
Deluan 2021-06-08 16:30:19 -04:00
parent 779571a086
commit 110e17b004
12 changed files with 79 additions and 47 deletions

View file

@ -2,15 +2,15 @@ package tests
import "github.com/navidrome/navidrome/model"
type MockTranscodingRepository struct {
type MockTranscodingRepo struct {
model.TranscodingRepository
}
func (m *MockTranscodingRepository) Get(id string) (*model.Transcoding, error) {
func (m *MockTranscodingRepo) Get(id string) (*model.Transcoding, error) {
return &model.Transcoding{ID: id, TargetFormat: "mp3", DefaultBitRate: 160}, nil
}
func (m *MockTranscodingRepository) FindByFormat(format string) (*model.Transcoding, error) {
func (m *MockTranscodingRepo) FindByFormat(format string) (*model.Transcoding, error) {
switch format {
case "mp3":
return &model.Transcoding{ID: "mp31", TargetFormat: "mp3", DefaultBitRate: 160}, nil