Skip to content

Commit b60dffd

Browse files
committed
Update tests to reflect change with selection handler
1 parent 9cf825a commit b60dffd

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Static/Tests/DataSourceTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ class DataSourceTests: XCTestCase {
9292
XCTAssertFalse(dataSource.tableView(tableView, shouldHighlightRowAt: IndexPath(row: 0, section: 0)))
9393

9494
dataSource.sections = [
95-
Section(rows: [Row(text: "Cupcakes", selection: {})])
95+
Section(rows: [Row(text: "Cupcakes", selection: { (row) in })])
9696
]
9797
XCTAssertTrue(dataSource.tableView(tableView, shouldHighlightRowAt: IndexPath(row: 0, section: 0)))
9898
}
9999

100100
func testSelection() {
101101
let expectation = self.expectation(description: "Selected")
102-
let selection = {
102+
let selection: Selection = { (row) in
103103
expectation.fulfill()
104104
}
105105

@@ -112,7 +112,7 @@ class DataSourceTests: XCTestCase {
112112

113113
func testAccessorySelection() {
114114
let expectation = self.expectation(description: "Accessory Selected")
115-
let selection = {
115+
let selection: Selection = { (row) in
116116
expectation.fulfill()
117117
}
118118

Static/Tests/RowTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Static
44
class RowTests: XCTestCase {
55

66
func testInit() {
7-
let selection: Selection = {}
7+
let selection: Selection = { (row) in }
88
let context: Row.Context = [
99
"Hello": "world"
1010
]
@@ -36,7 +36,7 @@ class RowTests: XCTestCase {
3636
}
3737

3838
func testInitWithSelectableAccessoryType() {
39-
let selection: Selection = {}
39+
let selection: Selection = { (row) in }
4040
let accessory: Row.Accessory = .detailButton(selection)
4141

4242
let row = Row(accessory: accessory)

0 commit comments

Comments
 (0)