mirror of
https://github.com/pikami/cosmium.git
synced 2026-08-11 07:37:00 +01:00
Fix failing test
This commit is contained in:
+15
-15
@@ -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) {
|
t.Run("Should query document with query parameters", func(t *testing.T) {
|
||||||
testCosmosQuery(t, collectionClient,
|
testCosmosQuery(t, collectionClient,
|
||||||
`select c.id
|
`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) {
|
runTestsWithPresets(t, "Test_Documents_Patch", presets, func(t *testing.T, ts *TestServer, client *azcosmos.Client) {
|
||||||
|
|||||||
Reference in New Issue
Block a user