@@ -48,18 +48,19 @@ suite = do
48
48
ts = timestamp (seconds 1584696645.0 ) (microseconds 123456 )
49
49
geoPoint = point (unsafePartial $ fromJust $ lat 45.666 ) (unsafePartial $ fromJust $ lon 12.25 )
50
50
bytes = blob " ꘚ見꿮嬲霃椮줵"
51
- document = DocumentData (fromFoldable [ " text" /\ (primitiveDocument (pvText " some text" ))
52
- , " number" /\ (primitiveDocument (pvNumber 273.15 ))
53
- , " bool" /\ (primitiveDocument (pvBoolean true ))
54
- , " null" /\ (primitiveDocument (pvNull ))
55
- , " point" /\ (primitiveDocument (pvGeographicalPoint geoPoint ))
56
- , " datetime" /\ (primitiveDocument (pvDateTime ts ))
57
- , " map" /\ mapDoc
58
- , " array" /\ (arrayDocument [ primitiveArrayValue (pvNumber 273.15 )
59
- , arrayMapDoc
60
- ])
61
- , " bytes" /\ (primitiveDocument (pvBytes bytes ))
62
- ])
51
+ document1 = DocumentData (fromFoldable [ " text" /\ (primitiveDocument (pvText " some text" ))
52
+ , " number" /\ (primitiveDocument (pvNumber 273.15 ))
53
+ , " bool" /\ (primitiveDocument (pvBoolean true ))
54
+ , " null" /\ (primitiveDocument (pvNull ))
55
+ , " point" /\ (primitiveDocument (pvGeographicalPoint geoPoint ))
56
+ ])
57
+ document2 = DocumentData (fromFoldable [ " datetime" /\ (primitiveDocument (pvDateTime ts ))
58
+ , " map" /\ mapDoc
59
+ , " array" /\ (arrayDocument [ primitiveArrayValue (pvNumber 273.15 )
60
+ , arrayMapDoc
61
+ ])
62
+ , " bytes" /\ (primitiveDocument (pvBytes bytes ))
63
+ ])
63
64
64
65
it " adds documents to a collection" do
65
66
testOptions <- buildTestOptions
@@ -75,6 +76,8 @@ suite = do
75
76
case maybeCollectionRef of
76
77
Nothing -> fail " invalid path"
77
78
Just collectionRef -> do
78
- addPromise <- liftEffect $ add collectionRef document
79
- _ <- toAff addPromise
79
+ addPromise1 <- liftEffect $ add collectionRef document1
80
+ _ <- toAff addPromise1
81
+ addPromise2 <- liftEffect $ add collectionRef document2
82
+ _ <- toAff addPromise2
80
83
pure unit
0 commit comments