diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SpotifyAPI-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SpotifyAPI-Package.xcscheme index a5f00591..d7498b6c 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/SpotifyAPI-Package.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SpotifyAPI-Package.xcscheme @@ -1,6 +1,6 @@ AnyPublisher { return self.saveItemsForCurrentUser( - uris: uris, types: [.show], path: "/me/shows" + uris: uris, + types: [.show], + path: "/me/shows", + idsInBody: false ) } @@ -816,7 +819,8 @@ public extension SpotifyAPI where uris: uris, types: [.show], path: "/me/shows", - market: market + market: market, + idsInBody: false ) } diff --git a/Tests/SpotifyAPIMainTests/API Tests/SpotifyAPIAlbumsTests.swift b/Tests/SpotifyAPIMainTests/API Tests/SpotifyAPIAlbumsTests.swift index df393c50..ee14e72e 100644 --- a/Tests/SpotifyAPIMainTests/API Tests/SpotifyAPIAlbumsTests.swift +++ b/Tests/SpotifyAPIMainTests/API Tests/SpotifyAPIAlbumsTests.swift @@ -724,6 +724,40 @@ extension SpotifyAPIAlbumsTests { } + func trackLink() { + + func receiveTrackLink(_ album: Album) { + encodeDecode(album) + + XCTAssertEqual(album.name, "") + } + + let hrefString = """ + https://api.spotify.com/v1/albums/2zffBP6FVUDZ3dsKodfQi6 + """ + + let href = URL(string: hrefString)! + + let expectation = XCTestExpectation( + description: "testTrackLink" + ) + + Self.spotify.getFromHref(href, responseType: Album.self) + .assertNoFailure() + .receiveOnMain() + .sink( + receiveCompletion: { _ in expectation.fulfill() }, + receiveValue: receiveTrackLink(_:) + ) + .store(in: &Self.cancellables) + + self.wait( + for: [expectation], + timeout: 60 + ) + + } + func receiveAlbumTracksPage1(_ page: PagingObject) { print("begin receiveAlbumTracksPage1")