浏览代码

tests: add comment to clearify tests

cmte 5 年之前
父节点
当前提交
f00312ffde
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      mb_test.go

+ 4 - 0
mb_test.go

@@ -6,6 +6,7 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
+//Test band names
 func TestShouldBeEqualToArtist(t *testing.T) {
 	m := NewMusicBrainz()
 	s, _ := m.SearchForArtist("Metallica")
@@ -14,18 +15,21 @@ func TestShouldBeEqualToArtist(t *testing.T) {
 	assert.Equal(t, name, "Metallica")
 }
 
+//Test band names with spaces
 func TestErrShouldBeNilIfArtistIsValid(t *testing.T) {
 	m := NewMusicBrainz()
 	_, err := m.SearchForArtist("Iron Maiden")
 	assert.Nil(t, err, "err should be nil for valid artist")
 }
 
+//Test err for existing artists
 func TestIfArtistIsValidThenErrIsNil(t *testing.T) {
 	m := NewMusicBrainz()
 	_, err := m.SearchForArtist("Metallica")
 	assert.Nil(t, err, "err should be nil if found artist")
 }
 
+//Test err for invalid artists
 func TestErrShouldContainErrorIfArtistIsInvalid(t *testing.T) {
 	m := NewMusicBrainz()
 	_, err := m.SearchForArtist("difjapodsifjapdsif adspofijdas flkdsajf pakdsfad")