diff --git a/test/discogs_test.exs b/test/discogs_test.exs new file mode 100644 index 00000000..9b82f2cd --- /dev/null +++ b/test/discogs_test.exs @@ -0,0 +1,20 @@ +defmodule DiscogsTest do + use ExUnit.Case, async: true + + alias Discogs.Fixtures + + describe "get_artist/1" do + test "it returns the artist" do + discogs_id = "discogs_id" + + expected_info = + Fixtures.Artist.get_artist() + + Req.Test.stub(Discogs.API, fn conn = %{request_path: "/artists/discogs_id"} -> + Req.Test.json(conn, Fixtures.Artist.get_artist()) + end) + + assert {:ok, expected_info} == Discogs.get_artist(discogs_id) + end + end +end