Files
music_library/test/last_fm/config_test.exs
T
Claudio Ortolina 0cae20a390 Add LastFm.Config test
It might seem redundant, but helps with refactoring down the line.
2024-12-04 09:58:42 +00:00

21 lines
557 B
Elixir

defmodule LastFm.ConfigTest do
use ExUnit.Case, async: true
describe "resolve/1" do
test "reads data from application configuration" do
assert %LastFm.Config{
api: LastFm.APIBehaviourMock,
api_key: api_key,
user: user,
auto_refresh: false,
refresh_interval: refresh_interval
} =
LastFm.Config.resolve(:music_library)
assert is_binary(api_key)
assert is_binary(user)
assert is_integer(refresh_interval)
end
end
end