blob: abeceb03ea8ed8f1bd0610c6bb1f33204f49e16a [file] [log] [blame]
{
"tests": [
{
"description": "update: ServerTimestamp beside an empty map",
"comment": "When a ServerTimestamp and a map both reside inside a map, the\nServerTimestamp should be stripped out but the empty map should remain.",
"update": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"jsonData": "{\"a\": {\"b\": {}, \"c\": \"ServerTimestamp\"}}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"mapValue": {
"fields": {
"b": {
"mapValue": {
"fields": {}
}
}
}
}
}
}
},
"updateMask": {
"fieldPaths": [
"a"
]
},
"currentDocument": {
"exists": true
}
},
{
"transform": {
"document": "projects/projectID/databases/(default)/documents/C/d",
"fieldTransforms": [
{
"fieldPath": "a.c",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
}
}
]
}