mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Add a test for FetchedRecordsController request modification with uppercase table and column names
This commit is contained in:
1 parent
7076809b71
commit
f5bbc43c87
1 file changed
+12
@@ -487,6 +487,18 @@ class FetchedRecordsControllerTests: GRDBTestCase {
|
||||
XCTAssertEqual(recorder.recordsBeforeChanges.map { $0.name }, ["Arthur", "Barbara"])
|
||||
XCTAssertEqual(recorder.recordsAfterChanges.count, 2)
|
||||
XCTAssertEqual(recorder.recordsAfterChanges.map { $0.name }, ["Arthur", "Barbara"])
|
||||
|
||||
recorder.transactionExpectation = expectation(description: "expectation")
|
||||
try dbQueue.inTransaction { db in
|
||||
try db.execute("UPDATE PERSONS SET EMAIL = ? WHERE NAME = ?", arguments: ["barbara@example.com", "Barbara"])
|
||||
return .commit
|
||||
}
|
||||
waitForExpectations(timeout: 1, handler: nil)
|
||||
|
||||
XCTAssertEqual(recorder.recordsBeforeChanges.count, 2)
|
||||
XCTAssertEqual(recorder.recordsBeforeChanges.map { $0.name }, ["Arthur", "Barbara"])
|
||||
XCTAssertEqual(recorder.recordsAfterChanges.count, 2)
|
||||
XCTAssertEqual(recorder.recordsAfterChanges.map { $0.name }, ["Arthur", "Barbara"])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user