To get artist info, try mbid and then artist name

This commit is contained in:
Claudio Ortolina
2024-12-04 21:07:56 +00:00
parent 39b925676f
commit 8350ffd3a4
5 changed files with 40 additions and 13 deletions
@@ -23,7 +23,8 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do
[artist] = collection_record.artists
artist_musicbrainz_id = artist.musicbrainz_id
expect(APIBehaviourMock, :get_artist_info, fn ^artist_musicbrainz_id, _config ->
expect(APIBehaviourMock, :get_artist_info, fn {:musicbrainz_id, ^artist_musicbrainz_id},
_config ->
{:ok,
artist_get_info()
|> Map.get("artist")