package model

import (
    "testing"
)

func Test_Artist_GetAvatar(t *testing.T) {
    want := "testavatar.png"
    artist := 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{}

    want = "/img/default-avatar.png" 
    got = artist.GetAvatar()
    if want != got {
        t.Errorf(`default value not returned when avatar is empty (want "%s", got "%s")`, want, got)
    }
}
