HEAVY: finish music service migration, tidy up services, more tests
This commit is contained in:
parent
9e311df462
commit
90a671982c
47 changed files with 2698 additions and 902 deletions
|
|
@ -1,21 +1,22 @@
|
|||
package model
|
||||
package model_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"arimelody-web/model"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Artist_GetAvatar(t *testing.T) {
|
||||
want := "testavatar.png"
|
||||
artist := Artist{ Avatar: want }
|
||||
artist := model.Artist{ Avatar: want }
|
||||
|
||||
got := artist.GetAvatar()
|
||||
if want != got {
|
||||
t.Errorf(`correct value not returned when avatar is populated (want "%s", got "%s")`, want, got)
|
||||
}
|
||||
|
||||
artist = Artist{}
|
||||
artist = model.Artist{}
|
||||
|
||||
want = "/img/default-avatar.png"
|
||||
want = model.DEFAULT_AVATAR_URL
|
||||
got = artist.GetAvatar()
|
||||
if want != got {
|
||||
t.Errorf(`default value not returned when avatar is empty (want "%s", got "%s")`, want, got)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue