Add LastFm.Feed.all_artists/0 and LastFm.Feed.all_albums/0

This commit is contained in:
Claudio Ortolina
2024-12-10 14:57:28 +03:00
parent a6e1e4e34a
commit c2ccb7dde2
2 changed files with 36 additions and 0 deletions
+10
View File
@@ -46,5 +46,15 @@ defmodule LastFm.FeedTest do
:ok = Feed.update([@track_two, @track_one])
assert [@track_two, @track_one] == Feed.all_tracks()
end
test "it returns artists in descending order of scrobble" do
:ok = Feed.update([@track_two, @track_one])
assert [@track_one.artist] == Feed.all_artists()
end
test "it returns albums in descending order of scrobble" do
:ok = Feed.update([@track_two, @track_one])
assert [@track_one.album] == Feed.all_albums()
end
end
end