add unit tests for ListenBrainz scrobbler (#317)
* Access HTTP client via interface to allow for testing * [Minor] Fix typo * Add initial test cases for ListenBrainz scrobbler * Fix linter error for insecure TLS in tests * Use Testify for unit tests * Move model into separate file * Embed JSON responses into tests * [Minor] Fix test function names
This commit is contained in:
@@ -107,7 +107,7 @@ func New(opts Options) (*Server, error) {
|
||||
PodcastsPath: opts.PodcastPath,
|
||||
CacheAudioPath: opts.CacheAudioPath,
|
||||
CoverCachePath: opts.CoverCachePath,
|
||||
Scrobblers: []scrobble.Scrobbler{&lastfm.Scrobbler{DB: opts.DB}, &listenbrainz.Scrobbler{}},
|
||||
Scrobblers: []scrobble.Scrobbler{&lastfm.Scrobbler{DB: opts.DB}, listenbrainz.NewScrobbler()},
|
||||
Podcasts: podcast,
|
||||
Transcoder: cacheTranscoder,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user