fix test_transaction_error for postgres

This commit is contained in:
lovasoa
2024-11-25 23:00:08 +01:00
parent 3e62cafb1a
commit e82f9931a7
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
BEGIN;
CREATE TEMPORARY TABLE t(f INTEGER NOT NULL);
CREATE TEMPORARY TABLE t(f VARCHAR(100) NOT NULL);
INSERT INTO t(f) VALUES ($x);
COMMIT;
+2 -2
View File
@@ -481,9 +481,9 @@ async fn test_transaction_error() -> actix_web::Result<()> {
.to_srv_request();
let resp = main_handler(req).await?;
let body = test::read_body(resp).await;
let body_str = String::from_utf8(body.to_vec()).unwrap();
let body_str = String::from_utf8(body.to_vec()).unwrap().to_ascii_lowercase();
assert!(
body_str.contains("constraint failed"),
body_str.contains("error") && body_str.contains("null"),
"{body_str}\nexpected to contain: constraint failed"
);
// Now query again, with ?x=1447