Use built-in Req stub for LastFm tests

This commit is contained in:
Claudio Ortolina
2025-02-27 13:38:06 +00:00
parent 522b3034aa
commit 3d11cd585d
9 changed files with 58 additions and 53 deletions
+9 -2
View File
@@ -5,7 +5,8 @@ defmodule LastFm.Config do
user: String.t(),
auto_refresh: boolean(),
refresh_interval: pos_integer(),
user_agent: String.t()
user_agent: String.t(),
req_options: Keyword.t()
}
@enforce_keys [:api, :api_key, :user]
@@ -14,7 +15,8 @@ defmodule LastFm.Config do
user: "",
auto_refresh: true,
refresh_interval: 60_000,
user_agent: "change me"
user_agent: "change me",
req_options: []
@schema NimbleOptions.new!(
api: [
@@ -43,6 +45,11 @@ defmodule LastFm.Config do
type: :string,
required: false,
default: "change me"
],
req_options: [
type: :keyword_list,
required: false,
default: []
]
)