You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gkye@djpearce
Sorry to bother you.
I'm not sure I understand the data structure for these nested types correctly, but imdb_id (and others) seem to not be decoding correctly.
XCTAssertEqual(data?.title,"In the Name of the Father")
}
func testMovieById(){vardata:MovieDetailedMDB?letexpectation=self.expectation(description:"Wait for data to load.")MovieMDB.movie(movieID:7984){ ddd, movie indebugPrint(String(data: ddd.data!, encoding:.utf8))
data = movie
expectation.fulfill()}waitForExpectations(timeout: expectationTimeout, handler:nil)XCTAssertNotNil(data)XCTAssertEqual(data?.title,"In the Name of the Father")XCTAssertEqual(data?.imdb_id,"tt0107207")// fails `nil`XCTAssertEqual(data?.homepage,"")// fails `nil`XCTAssertEqual(data?.runtime,133)// fails `nil`}func testMovieDetailById(){vardata:MovieDetailedMDB?letexpectation=self.expectation(description:"Wait for data to load.")MovieDetailedMDB.movie(movieID:7984){ ddd, movie indebugPrint(String(data: ddd.data!, encoding:.utf8))
data = movie
expectation.fulfill()}waitForExpectations(timeout: expectationTimeout, handler:nil)XCTAssertNotNil(data)XCTAssertEqual(data?.title,"In the Name of the Father")XCTAssertEqual(data?.imdb_id,"tt0107207")// fails `nil`XCTAssertEqual(data?.homepage,"")// fails `nil`XCTAssertEqual(data?.runtime,133)// fails `nil`}
The text was updated successfully, but these errors were encountered:
Is there some documentation for this? Where can we access the DocC documentation that's being generated on each merge? Maybe a link in the readme would be helpful 🙏🏼
@gkye @djpearce
Sorry to bother you.
I'm not sure I understand the data structure for these nested types correctly, but
imdb_id
(and others) seem to not be decoding correctly.First of all, it's a string in json and the prop is
Int!
I augmented tests below to confirm. Let me open a PR soon.
TheMovieDatabaseSwiftWrapper/Tests/TMDBSwiftTests/MovieMDBTests.swift
Lines 34 to 46 in 094a8d9
The text was updated successfully, but these errors were encountered: