Refactoring to a cleaner architecture
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/deluan/gosonic/utils"
|
||||
"github.com/deluan/gosonic/models"
|
||||
"github.com/deluan/gosonic/domain"
|
||||
"github.com/deluan/gosonic/tests"
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ func TestCollectIndex(t *testing.T) {
|
||||
ig := utils.IndexGroups{"A":"A", "B":"B", "Tom":"Tom", "X":"X-Z"}
|
||||
|
||||
Convey("Simple Name", t, func() {
|
||||
a := &models.Artist{Name: "Björk"}
|
||||
a := &domain.Artist{Name: "Björk"}
|
||||
artistIndex := make(map[string]tempIndex)
|
||||
|
||||
collectIndex(ig, a, artistIndex)
|
||||
@@ -28,7 +28,7 @@ func TestCollectIndex(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Name not in the index", t, func() {
|
||||
a := &models.Artist{Name: "Kraftwerk"}
|
||||
a := &domain.Artist{Name: "Kraftwerk"}
|
||||
artistIndex := make(map[string]tempIndex)
|
||||
|
||||
collectIndex(ig, a, artistIndex)
|
||||
@@ -42,7 +42,7 @@ func TestCollectIndex(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Name starts with an article", t, func() {
|
||||
a := &models.Artist{Name: "The The"}
|
||||
a := &domain.Artist{Name: "The The"}
|
||||
artistIndex := make(map[string]tempIndex)
|
||||
|
||||
collectIndex(ig, a, artistIndex)
|
||||
@@ -56,7 +56,7 @@ func TestCollectIndex(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Name match a multichar entry", t, func() {
|
||||
a := &models.Artist{Name: "Tom Waits"}
|
||||
a := &domain.Artist{Name: "Tom Waits"}
|
||||
artistIndex := make(map[string]tempIndex)
|
||||
|
||||
collectIndex(ig, a, artistIndex)
|
||||
|
||||
Reference in New Issue
Block a user