spec/mongoid/positional_spec.rb in mongoid-5.2.1 vs spec/mongoid/positional_spec.rb in mongoid-5.4.0
- old
+ new
@@ -15,12 +15,12 @@
"$set" => {
"field" => "value",
"children.0.field" => "value",
"children.0.children.1.children.3.field" => "value"
},
- "$pushAll" => {
- "children.0.children.1.children.3.fields" => [ "value", "value" ]
+ "$push" => {
+ "children.0.children.1.children.3.fields" => {'$each' => [ "value", "value" ]}
}
}
end
context "when a child has an embeds many under an embeds one" do
@@ -111,12 +111,12 @@
"$set" => {
"field" => "value",
"children.$.field" => "value",
"children.0.children.1.children.3.field" => "value"
},
- "$pushAll" => {
- "children.0.children.1.children.3.fields" => [ "value", "value" ]
+ "$push" => {
+ "children.0.children.1.children.3.fields" => { '$each' => [ "value", "value" ] }
}
}
end
let(:processed) do
@@ -139,12 +139,12 @@
"$set" => {
"field" => "value",
"children.0.field" => "value",
"children.0.children.1.children.3.field" => "value"
},
- "$pushAll" => {
- "children.0.children.1.children.3.fields" => [ "value", "value" ]
+ "$push" => {
+ "children.0.children.1.children.3.fields" => { '$each' => [ "value", "value" ] }
}
}
end
let(:processed) do
@@ -168,12 +168,12 @@
"$set" => {
"field" => "value",
"children.$.field" => "value",
"children.0.children.1.children.3.field" => "value"
},
- "$pushAll" => {
- "children.0.children.1.children.3.fields" => [ "value", "value" ]
+ "$push" => {
+ "children.0.children.1.children.3.fields" => { '$each' => [ "value", "value" ] }
}
}
end
let(:processed) do
@@ -201,11 +201,11 @@
"$set" => {
"field" => "value",
"children.$.field" => "value",
"children.0.children.1.children.3.field" => "value"
},
- "$pushAll" => {
- "children.0.children.1.children.3.fields" => [ "value", "value" ]
+ "$push" => {
+ "children.0.children.1.children.3.fields" => { '$each' => [ "value", "value" ] }
}
}
end
let(:processed) do