Skip to content

Commit

Permalink
Update tests to reflect change with selection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cgossain committed Jun 2, 2019
1 parent 870838e commit 056a415
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Static/Tests/DataSourceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -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()
}

Expand Down
4 changes: 2 additions & 2 deletions Static/Tests/RowTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 056a415

Please sign in to comment.