Skip to content

Commit

Permalink
Adds unit test for cellForRow method for recently visited section
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxeAlonso committed Sep 18, 2024
1 parent baf7d01 commit a2e429e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ final class SearchOptionsDataSourceTests: XCTestCase {
XCTAssertNotNil(cellForRow as? DefaultSearchOptionTableViewCell)
}

func testCellForRowRecentlyVisited() {
// Arrange
let tableView = UITableView()
tableView.registerNib(cellType: RecentlyVisitedMoviesTableViewCell.self)
viewModel.sectionAtIndexResult = .recentlyVisited
// Act
let cellForRow = dataSource.tableView(tableView, cellForRowAt: IndexPath(row: 0, section: 0))
// Assert
XCTAssertNotNil(cellForRow as? RecentlyVisitedMoviesTableViewCell)
}

func testDidSelectMovie() {
// Act
Expand Down

0 comments on commit a2e429e

Please sign in to comment.