This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
go-discogs/labels_test.go

27 lines
708 B
Go
Raw Normal View History

2016-03-10 15:10:08 +00:00
package discogs
import (
"fmt"
"testing"
)
func TestLabelService_Label(t *testing.T) {
expectedId := 1000
2017-02-14 19:01:50 +00:00
d := NewClient(testUserAgent, testToken)
2016-03-10 15:10:08 +00:00
label, _, err := d.Label.Label(&LabelParams{Label_id: "1000"})
check(t, err)
assert(t, label.Id == expectedId, fmt.Sprintf("Release.Title looked for %s, and received %s ", expectedId, label.Id))
}
2016-03-10 15:26:39 +00:00
func TestLabelService_Releases(t *testing.T) {
2017-04-25 16:39:32 +00:00
expectedId := "Ghetto Sol"
2016-03-10 15:26:39 +00:00
2017-02-14 19:01:50 +00:00
d := NewClient(testUserAgent, testToken)
2016-03-10 15:26:39 +00:00
label, _, err := d.Label.Releases(&LabelParams{Label_id: "1000"})
check(t, err)
assert(t, label.Releases[0].Title == expectedId, fmt.Sprintf("Release.Title looked for %s, and received %s ", expectedId, label.Releases[0].Title))
}