Introduced engine.Scrobbler

Also refactored mocks into their original packages, to avoid cyclic references. Is there a better way to have mocks in GoLang tests?
This commit is contained in:
Deluan
2016-03-16 17:48:44 -04:00
parent 4aa02e68e5
commit b660a70688
16 changed files with 158 additions and 47 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/persistence"
. "github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/utils"
. "github.com/smartystreets/goconvey/convey"
)
@@ -14,7 +14,7 @@ import (
func TestGetAlbumList(t *testing.T) {
Init(t, false)
mockAlbumRepo := mocks.CreateMockAlbumRepo()
mockAlbumRepo := persistence.CreateMockAlbumRepo()
utils.DefineSingleton(new(domain.AlbumRepository), func() domain.AlbumRepository {
return mockAlbumRepo
})