From 632f5c4661dd1803a17859e8063816035c5b78b8 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 14 Dec 2024 23:19:14 +0300 Subject: [PATCH] Include album names in mb fixtures --- lib/mix/tasks/music_brainz/refresh_fixtures.ex | 6 +++--- .../{release.json => release - marillion - marbles.json} | 0 ...oup.json => release_group - marillion - marbles.json} | 0 ...with_includes - mariusz duda - lockdown trilogy.json} | 0 test/support/fixtures/release_groups_fixtures.ex | 9 ++++++--- 5 files changed, 9 insertions(+), 6 deletions(-) rename test/support/fixtures/{release.json => release - marillion - marbles.json} (100%) rename test/support/fixtures/{release_group.json => release_group - marillion - marbles.json} (100%) rename test/support/fixtures/{release_group_with_includes.json => release_group_with_includes - mariusz duda - lockdown trilogy.json} (100%) diff --git a/lib/mix/tasks/music_brainz/refresh_fixtures.ex b/lib/mix/tasks/music_brainz/refresh_fixtures.ex index 0600d5f7..7d45c7d9 100644 --- a/lib/mix/tasks/music_brainz/refresh_fixtures.ex +++ b/lib/mix/tasks/music_brainz/refresh_fixtures.ex @@ -11,11 +11,11 @@ defmodule Mix.Tasks.MusicBrainz.RefreshFixtures do @fixtures_folder Path.join([File.cwd!(), "test/support/fixtures"]) @fixture_files %{ - "release_group.json" => + "release_group - marillion - marbles.json" => "https://musicbrainz.org/ws/2/release-group/20790e26-98e4-3ad3-a67f-b674758b942d?fmt=json&inc=artists+genres+releases+release-group-rels", - "release_group_with_includes.json" => + "release_group_with_includes - mariusz duda - lockdown trilogy.json" => "https://musicbrainz.org/ws/2/release-group/5db72bc0-6ce3-4beb-bd51-86b58ed8cf71?fmt=json&inc=artists+genres+releases+release-group-rels", - "release.json" => + "release - marillion - marbles.json" => "https://musicbrainz.org/ws/2/release/0e290154-5375-4f4f-a658-4a92bf02faa5?fmt=json&inc=release-groups" } diff --git a/test/support/fixtures/release.json b/test/support/fixtures/release - marillion - marbles.json similarity index 100% rename from test/support/fixtures/release.json rename to test/support/fixtures/release - marillion - marbles.json diff --git a/test/support/fixtures/release_group.json b/test/support/fixtures/release_group - marillion - marbles.json similarity index 100% rename from test/support/fixtures/release_group.json rename to test/support/fixtures/release_group - marillion - marbles.json diff --git a/test/support/fixtures/release_group_with_includes.json b/test/support/fixtures/release_group_with_includes - mariusz duda - lockdown trilogy.json similarity index 100% rename from test/support/fixtures/release_group_with_includes.json rename to test/support/fixtures/release_group_with_includes - mariusz duda - lockdown trilogy.json diff --git a/test/support/fixtures/release_groups_fixtures.ex b/test/support/fixtures/release_groups_fixtures.ex index 0af8f46d..2b2a95ba 100644 --- a/test/support/fixtures/release_groups_fixtures.ex +++ b/test/support/fixtures/release_groups_fixtures.ex @@ -25,13 +25,16 @@ defmodule MusicLibrary.ReleaseGroupsFixtures do end def release_group do - Path.join([@fixtures_folder, "release_group.json"]) + Path.join([@fixtures_folder, "release_group - marillion - marbles.json"]) |> File.read!() |> Jason.decode!() end def release_group_with_includes do - Path.join([@fixtures_folder, "release_group_with_includes.json"]) + Path.join([ + @fixtures_folder, + "release_group_with_includes - mariusz duda - lockdown trilogy.json" + ]) |> File.read!() |> Jason.decode!() end @@ -41,7 +44,7 @@ defmodule MusicLibrary.ReleaseGroupsFixtures do end def release do - Path.join([@fixtures_folder, "release.json"]) + Path.join([@fixtures_folder, "release - marillion - marbles.json"]) |> File.read!() |> Jason.decode!() end