Don't run LastFm.Feed in tests

This commit is contained in:
Claudio Ortolina
2024-11-04 09:45:05 +00:00
parent a0543de1f2
commit d818cdbae5
7 changed files with 34 additions and 7 deletions
+6 -2
View File
@@ -6,11 +6,15 @@ defmodule LastFm.Supervisor do
end
@impl true
def init(_init_arg) do
def init(opts) do
:ok = LastFm.Feed.create_table!()
api =
Keyword.fetch!(opts, :api)
|> IO.inspect()
children = [
{LastFm.Refresh, %{user: "cloud8421", api_key: api_key()}}
{LastFm.Refresh, %{api: api, user: "cloud8421", api_key: api_key()}}
]
Supervisor.init(children, strategy: :one_for_one)