Fix PersistenceError.description

This commit is contained in:
Gwendal Roué committed 2019-02-25 20:43:40 +01:00
1 parent 31bdb2eeaa
commit 8ef28b0683
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ extension PersistenceError {
switch self {
case let .recordNotFound(databaseTableName: databaseTableName, key: key):
let row = Row(key) // For nice output
return "Record not found in table \(databaseTableName): \(row.description)"
return "Key not found in table \(databaseTableName): \(row.description)"
}
}
}
@@ -704,7 +704,7 @@ class MutablePersistableRecordTests: GRDBTestCase {
key: ["id": .null])
XCTAssertEqual(
error.description,
"Record not found in table place: [id:NULL]")
"Key not found in table place: [id:NULL]")
}
do {
let error = PersistenceError.recordNotFound(
@@ -712,7 +712,7 @@ class MutablePersistableRecordTests: GRDBTestCase {
key: ["uuid": "E621E1F8-C36C-495A-93FC-0C247A3E6E5F".databaseValue])
XCTAssertEqual(
error.description,
"Record not found in table user: [uuid:\"E621E1F8-C36C-495A-93FC-0C247A3E6E5F\"]")
"Key not found in table user: [uuid:\"E621E1F8-C36C-495A-93FC-0C247A3E6E5F\"]")
}
}
}