mb_test.go 406 B

12345678910111213141516171819
  1. package mb
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func test_mb_search(t *testing.T) {
  7. m := NewMusicBrainzSearch()
  8. _ = m.search_for_artist("Metallica")
  9. assert.Equal(t, m.get_artist_name(), "Metallica")
  10. }
  11. func test_error_should_be_nil(t *testing.T) {
  12. m := NewMusicBrainzSearch()
  13. err := m.search_for_artist("Metallica")
  14. assert.Nil(t, err, "err should be nil if found artist")
  15. }