Refactored logic from getMusicDirectory.view to the new engine layer.

This reveled a nasty bug in the DI code. Tests are broken
This commit is contained in:
Deluan
2016-03-08 08:48:47 -05:00
parent 46e7627fd3
commit e10e730af1
6 changed files with 200 additions and 123 deletions
+1 -3
View File
@@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/deluan/gosonic/domain"
)
@@ -34,9 +35,6 @@ func (m *MockArtist) SetData(j string, size int) {
}
func (m *MockArtist) Exists(id string) (bool, error) {
if m.err {
return false, errors.New("Error!")
}
_, found := m.data[id]
return found, nil
}