diff --git a/Tests/GRDBTests/AssociationPrefetchingTests.swift b/Tests/GRDBTests/AssociationPrefetchingTests.swift index c3145e05b..728eaca83 100644 --- a/Tests/GRDBTests/AssociationPrefetchingTests.swift +++ b/Tests/GRDBTests/AssociationPrefetchingTests.swift @@ -999,7 +999,8 @@ class AssociationPrefetchingTests: GRDBTestCase { .belongsTo(A.self) .including(all: A .hasMany(C.self) - .orderByPrimaryKey()) + .orderByPrimaryKey() + .forKey("cs")) // TODO: auto-pluralization ) .orderByPrimaryKey() @@ -1030,13 +1031,13 @@ class AssociationPrefetchingTests: GRDBTestCase { XCTAssertEqual(rows.count, 3) XCTAssertEqual(rows[0].unscoped, ["colb1": 4, "colb2": 1, "colb3": "b1"]) - XCTAssertEqual(rows[0].prefetchTree.keys.count, 0) + XCTAssertEqual(rows[0].prefetchTree.keys, ["cs"]) XCTAssertEqual(rows[1].unscoped, ["colb1": 5, "colb2": 1, "colb3": "b2"]) - XCTAssertEqual(rows[1].prefetchTree.keys.count, 0) + XCTAssertEqual(rows[1].prefetchTree.keys, ["cs"]) XCTAssertEqual(rows[2].unscoped, ["colb1": 6, "colb2": 2, "colb3": "b3"]) - XCTAssertEqual(rows[2].prefetchTree.keys.count, 0) + XCTAssertEqual(rows[2].prefetchTree.keys, ["cs"]) } }