add features
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package backend
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||
)
|
||||
|
||||
func TestFetchLyricsAsyncWithNilTrack(t *testing.T) {
|
||||
lm := &LyricsManager{}
|
||||
called := false
|
||||
|
||||
lm.FetchLyricsAsync(nil, func(id string, lyrics *mediaprovider.Lyrics) {
|
||||
called = true
|
||||
if id != "" || lyrics != nil {
|
||||
t.Fatalf("got callback values (%q, %v), want empty ID and nil lyrics", id, lyrics)
|
||||
}
|
||||
})
|
||||
if !called {
|
||||
t.Fatal("callback was not called")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user