From 056a415954b9d80d4cca071379f52507654d4ca6 Mon Sep 17 00:00:00 2001 From: Christian Gossain Date: Fri, 25 Jan 2019 15:09:06 -0700 Subject: [PATCH] Update tests to reflect change with selection handler --- Static/Tests/DataSourceTests.swift | 6 +++--- Static/Tests/RowTests.swift | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Static/Tests/DataSourceTests.swift b/Static/Tests/DataSourceTests.swift index 67664f5..4772e26 100644 --- a/Static/Tests/DataSourceTests.swift +++ b/Static/Tests/DataSourceTests.swift @@ -92,14 +92,14 @@ class DataSourceTests: XCTestCase { XCTAssertFalse(dataSource.tableView(tableView, shouldHighlightRowAt: IndexPath(row: 0, section: 0))) dataSource.sections = [ - Section(rows: [Row(text: "Cupcakes", selection: {})]) + Section(rows: [Row(text: "Cupcakes", selection: { (row) in })]) ] XCTAssertTrue(dataSource.tableView(tableView, shouldHighlightRowAt: IndexPath(row: 0, section: 0))) } func testSelection() { let expectation = self.expectation(description: "Selected") - let selection = { + let selection: Selection = { (row) in expectation.fulfill() } @@ -112,7 +112,7 @@ class DataSourceTests: XCTestCase { func testAccessorySelection() { let expectation = self.expectation(description: "Accessory Selected") - let selection = { + let selection: Selection = { (row) in expectation.fulfill() } diff --git a/Static/Tests/RowTests.swift b/Static/Tests/RowTests.swift index ccb54ac..2ef3032 100644 --- a/Static/Tests/RowTests.swift +++ b/Static/Tests/RowTests.swift @@ -4,7 +4,7 @@ import Static class RowTests: XCTestCase { func testInit() { - let selection: Selection = {} + let selection: Selection = { (row) in } let context: Row.Context = [ "Hello": "world" ] @@ -32,7 +32,7 @@ class RowTests: XCTestCase { } func testInitWithSelectableAccessoryType() { - let selection: Selection = {} + let selection: Selection = { (row) in } let accessory: Row.Accessory = .detailButton(selection) let row = Row(accessory: accessory)