From c659a0e4d4f62fc5a274073dffb7d07457f56575 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Fri, 29 Aug 2025 20:04:42 -0400 Subject: [PATCH] Update upsert test to be more relevant to the exact behavior --- testing/upsert.test | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/testing/upsert.test b/testing/upsert.test index e1c9d9a58..078c77e37 100644 --- a/testing/upsert.test +++ b/testing/upsert.test @@ -65,15 +65,12 @@ do_execsql_test_on_specific_db {:memory:} upsert-values-mixed-insert-update { } {1|uno 2|dos} -do_execsql_test_on_specific_db {:memory:} upsert-select-mixed { - CREATE TABLE ms (a UNIQUE, b); - INSERT INTO ms VALUES (1,'one'); - INSERT INTO ms - SELECT 1,'ONE' UNION ALL SELECT 2,'TWO' - ON CONFLICT(a) DO UPDATE SET b = excluded.b; - SELECT * FROM ms ORDER BY a; -} {1|ONE -2|TWO} +do_execsql_test_on_specific_db {:memory:} upsert-select-single { + CREATE TABLE s1 (a UNIQUE, b); + INSERT INTO s1 VALUES (1,'old'); + INSERT INTO s1 SELECT 1,'NEW' ON CONFLICT(a) DO UPDATE SET b = excluded.b; + SELECT * FROM s1; +} {1|NEW} do_execsql_test_on_specific_db {:memory:} upsert-composite-target-orderless { CREATE TABLE c (a, b, val);