| { |
| "tests": [ |
| { |
| "description": "create: ServerTimestamp with data", |
| "comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.", |
| "create": { |
| "docRefPath": "projects/projectID/databases/(default)/documents/C/d", |
| "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", |
| "request": { |
| "database": "projects/projectID/databases/(default)", |
| "writes": [ |
| { |
| "update": { |
| "name": "projects/projectID/databases/(default)/documents/C/d", |
| "fields": { |
| "a": { |
| "integerValue": "1" |
| } |
| } |
| }, |
| "currentDocument": { |
| "exists": false |
| } |
| }, |
| { |
| "transform": { |
| "document": "projects/projectID/databases/(default)/documents/C/d", |
| "fieldTransforms": [ |
| { |
| "fieldPath": "b", |
| "setToServerValue": "REQUEST_TIME" |
| } |
| ] |
| } |
| } |
| ] |
| } |
| } |
| } |
| ] |
| } |