Skip to content

Commit c069d67

Browse files
committed
Update in-favorites test for non-library songs.
The API now returns a false flag rather than throwing when a song isn't in the library.
1 parent 7b97393 commit c069d67

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Tests/MusadoraKitTests/Library/InFavoritesTests.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct InFavoritesTests {
6060
}
6161

6262
@Test
63-
func songNotInLibraryThrowsError() throws {
63+
func songNotInLibraryReturnsFalse() throws {
6464
let json = """
6565
{
6666
"data": [{
@@ -80,10 +80,9 @@ struct InFavoritesTests {
8080
"""
8181

8282
let data = try #require(json.data(using: .utf8))
83+
let inFavorites = try InFavoritesParser.parse(from: data, itemType: .songs)
8384

84-
#expect(throws: MusadoraKitError.self) {
85-
try InFavoritesParser.parse(from: data, itemType: .songs)
86-
}
85+
#expect(inFavorites == false)
8786
}
8887

8988
// MARK: - Album Tests

0 commit comments

Comments
 (0)