diff options
author | Michael Lehenbauer <mikelehen@gmail.com> | 2018-04-13 14:22:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 14:22:41 -0700 |
commit | 60d43d7b0980719beac21811da712f1cb4881308 (patch) | |
tree | 268424fabe81a547ee17b737177f24130b1f4d89 /Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm | |
parent | dfdab5bee001546b3f36638c00b96b381cb4c040 (diff) |
Array Transforms public API and parsing
This includes the new FIRFieldValue sentinels, the FSTUserDataConverter code to parse them into internal ArrayTransform operations for use in an FSTTransformMutation, and some sanity testing in FSTMutationTests.
I still need to implement FSTTransformMutation support for local application and serialization (and then integration tests).
Diffstat (limited to 'Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm')
-rw-r--r-- | Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm index 454b108..a648cd8 100644 --- a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm +++ b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm @@ -17,6 +17,7 @@ #import "Firestore/Source/Remote/FSTSerializerBeta.h" #import <FirebaseFirestore/FIRFieldPath.h> +#import <FirebaseFirestore/FIRFieldValue.h> #import <FirebaseFirestore/FIRFirestoreErrors.h> #import <FirebaseFirestore/FIRGeoPoint.h> #import <FirebaseFirestore/FIRTimestamp.h> @@ -367,7 +368,10 @@ NS_ASSUME_NONNULL_BEGIN } - (void)testEncodesTransformMutation { - FSTTransformMutation *mutation = FSTTestTransformMutation(@"docs/1", @[ @"a", @"bar.baz" ]); + FSTTransformMutation *mutation = FSTTestTransformMutation(@"docs/1", @{ + @"a" : [FIRFieldValue fieldValueForServerTimestamp], + @"bar.baz" : [FIRFieldValue fieldValueForServerTimestamp] + }); GCFSWrite *proto = [GCFSWrite message]; proto.transform = [GCFSDocumentTransform message]; proto.transform.document = [self.serializer encodedDocumentKey:mutation.key]; |