From a3eec6aa24245af42629f9487de3429ddef656eb Mon Sep 17 00:00:00 2001 From: Pijus Kamandulis Date: Wed, 5 Aug 2026 20:18:30 +0300 Subject: [PATCH] Fix failing test --- api/tests/documents_test.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/api/tests/documents_test.go b/api/tests/documents_test.go index 98cdbb6..54d2f7a 100644 --- a/api/tests/documents_test.go +++ b/api/tests/documents_test.go @@ -158,21 +158,6 @@ func Test_Documents(t *testing.T) { ) }) - t.Run("Should query document with escaped single-quoted string literal", func(t *testing.T) { - ts.DataStore.CreateDocument(testDatabaseName, testCollectionName, map[string]interface{}{"id": "apostrophe-doc", "pk": "ap", "name": "it's"}) - - testCosmosQuery(t, collectionClient, - `select c.id - FROM c - WHERE c.name='it\'s' - ORDER BY c.id`, - nil, - []interface{}{ - map[string]interface{}{"id": "apostrophe-doc"}, - }, - ) - }) - t.Run("Should query document with query parameters", func(t *testing.T) { testCosmosQuery(t, collectionClient, `select c.id @@ -268,6 +253,21 @@ func Test_Documents(t *testing.T) { } } }) + + t.Run("Should query document with escaped single-quoted string literal", func(t *testing.T) { + ts.DataStore.CreateDocument(testDatabaseName, testCollectionName, map[string]interface{}{"id": "apostrophe-doc", "pk": "ap", "name": "it's"}) + + testCosmosQuery(t, collectionClient, + `select c.id + FROM c + WHERE c.name='it\'s' + ORDER BY c.id`, + nil, + []interface{}{ + map[string]interface{}{"id": "apostrophe-doc"}, + }, + ) + }) }) runTestsWithPresets(t, "Test_Documents_Patch", presets, func(t *testing.T, ts *TestServer, client *azcosmos.Client) {