We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Document::extend
1 parent a9eba30 commit bc816ebCopy full SHA for bc816eb
src/tests/modules/ordered.rs
@@ -231,3 +231,31 @@ fn entry() {
231
},
232
);
233
}
234
+
235
+#[test]
236
+fn extend() {
237
+ let _guard = LOCK.run_concurrently();
238
+ let mut doc1 = doc! {
239
+ "first": 1,
240
+ "second": "data",
241
+ "subdoc": doc! { "a": 1, "b": 2 },
242
+ };
243
244
+ let doc2 = doc! {
245
+ "third": "abcdefg",
246
+ "first": 2,
247
+ "subdoc": doc! { "c": 3 },
248
249
250
+ doc1.extend(doc2);
251
252
+ assert_eq!(
253
+ doc1,
254
+ doc! {
255
256
257
258
259
+ },
260
+ );
261
+}
0 commit comments