Skip to content

Commit

Permalink
Issue #50: More MappedRowTests
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed May 20, 2016
1 parent 3fcbcb9 commit 4c2a53a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Public/Core/Row/MappedRowTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ class MappedRowTests: GRDBTestCase {
}
}

func testRowAdapterIsCaseInsensitiveAndPicksLeftmostBaseColumn() {
assertNoError {
let dbQueue = try makeDatabaseQueue()
dbQueue.inDatabase { db in
let adapter = RowAdapter(mapping: ["name": "baseNaMe"])
let row = Row.fetchOne(db, "SELECT 1 AS basename, 2 AS baseNaMe, 3 AS BASENAME", adapter: adapter)!

XCTAssertEqual(row.databaseValue(named: "name"), 1.databaseValue)
}
}
}

func testMissingColumn() {
assertNoError {
let dbQueue = try makeDatabaseQueue()
Expand Down

0 comments on commit 4c2a53a

Please sign in to comment.