Browse Source

Update SearchDataSourceTests.swift

master
Abhishek Banthia 7 months ago
parent
commit
bac5d6a857
  1. 6
      Clocker/ClockerUnitTests/SearchDataSourceTests.swift

6
Clocker/ClockerUnitTests/SearchDataSourceTests.swift

@ -71,7 +71,7 @@ class SearchDataSourceTests: XCTestCase {
let result2 = subject.retrieveResult(1) let result2 = subject.retrieveResult(1)
let unwrap2 = try XCTUnwrap(result2) let unwrap2 = try XCTUnwrap(result2)
if let metadata = unwrap2 as? TimezoneMetadata { if let metadata = unwrap2 as? TimezoneMetadata {
XCTAssert(metadata.timezone.name == "America/Tijuana") XCTAssert(metadata.timezone.name == "America/Santa_Isabel")
} }
// Test placeForRow // Test placeForRow
@ -82,7 +82,7 @@ class SearchDataSourceTests: XCTestCase {
XCTAssert(rowType1 == .timezone) XCTAssert(rowType1 == .timezone)
// Test count // Test count
XCTAssertEqual(subject.resultsCount(), 4) XCTAssertEqual(subject.resultsCount(), 5)
// Test retrieveFilteredResultFromGoogleAPI // Test retrieveFilteredResultFromGoogleAPI
let firstResult = try XCTUnwrap(subject.retrieveFilteredResultFromGoogleAPI(0)) let firstResult = try XCTUnwrap(subject.retrieveFilteredResultFromGoogleAPI(0))
@ -97,7 +97,7 @@ class SearchDataSourceTests: XCTestCase {
setupMockData() setupMockData()
let resultsCount = subject.numberOfRows(in: mockTableView) let resultsCount = subject.numberOfRows(in: mockTableView)
XCTAssert(resultsCount == 4) XCTAssertEqual(resultsCount, 5)
XCTAssert(subject.tableView(mockTableView, heightOfRow: 0) == 30) XCTAssert(subject.tableView(mockTableView, heightOfRow: 0) == 30)
} }

Loading…
Cancel
Save