From f5bbc43c87babe3dfdd2914a53d63d76ef95f202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 17 Oct 2016 14:00:32 +0200 Subject: [PATCH] Add a test for FetchedRecordsController request modification with uppercase table and column names --- .../FetchedRecordsControllerTests.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/Public/FetchedRecordsController/FetchedRecordsControllerTests.swift b/Tests/Public/FetchedRecordsController/FetchedRecordsControllerTests.swift index 4888f5da8..59cfbc216 100644 --- a/Tests/Public/FetchedRecordsController/FetchedRecordsControllerTests.swift +++ b/Tests/Public/FetchedRecordsController/FetchedRecordsControllerTests.swift @@ -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"]) } }