From 162c10e70a6ca3ea1c8885dae75479ac61d6be69 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 20 Apr 2026 06:30:00 +0100 Subject: [PATCH] Pin fetch_artist_image asset lookup Refs #176 --- test/music_library/worker/fetch_artist_image_test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/music_library/worker/fetch_artist_image_test.exs b/test/music_library/worker/fetch_artist_image_test.exs index 73ecb652..7b87521b 100644 --- a/test/music_library/worker/fetch_artist_image_test.exs +++ b/test/music_library/worker/fetch_artist_image_test.exs @@ -6,6 +6,8 @@ defmodule MusicLibrary.Worker.FetchArtistImageTest do alias Discogs.Fixtures.Artist alias MusicLibrary.Artists + alias MusicLibrary.Assets + alias MusicLibrary.Assets.Asset alias MusicLibrary.Worker.FetchArtistImage setup do @@ -25,7 +27,8 @@ defmodule MusicLibrary.Worker.FetchArtistImageTest do updated = Artists.get_artist_info!(artist_info.id) assert is_binary(updated.image_data_hash) and byte_size(updated.image_data_hash) > 0 - assert MusicLibrary.Assets.get(updated.image_data_hash) != nil + hash = updated.image_data_hash + assert %Asset{hash: ^hash} = Assets.get(hash) end test "cancels when no discogs data exists" do