spec/mongoid/atomic/modifiers_spec.rb in mongoid-5.4.1 vs spec/mongoid/atomic/modifiers_spec.rb in mongoid-6.0.0.beta

- old
+ new

@@ -209,14 +209,14 @@ modifiers.push(pushes) end it "adds the push all modifiers" do expect(modifiers).to eq( - { "$push" => - { "addresses" => { '$each' => [ + { "$pushAll" => + { "addresses" => [ { "street" => "Oxford St" } - ] } + ] } } ) end end @@ -236,15 +236,15 @@ modifiers.push(push_two) end it "adds the push all modifiers" do expect(modifiers).to eq( - { "$push" => - { "addresses" => { '$each' => [ + { "$pushAll" => + { "addresses" => [ { "street" => "Hobrechtstr." }, { "street" => "Pflugerstr." } - ] } + ] } } ) end end @@ -268,14 +268,14 @@ end it "adds the push all modifiers to the conflicts hash" do expect(modifiers).to eq( { "$set" => { "addresses.0.street" => "Bond" }, - conflicts: { "$push" => - { "addresses" => { '$each' => [ + conflicts: { "$pushAll" => + { "addresses" => [ { "street" => "Oxford St" } - ] } + ] } } } ) end @@ -298,14 +298,14 @@ it "adds the push all modifiers to the conflicts hash" do expect(modifiers).to eq( { "$pullAll" => { "addresses" => { "street" => "Bond St" }}, - conflicts: { "$push" => - { "addresses" => { '$each' => [ + conflicts: { "$pushAll" => + { "addresses" => [ { "street" => "Oxford St" } - ] } + ] } } } ) end @@ -326,15 +326,15 @@ modifiers.push(pushes) end it "adds the push all modifiers to the conflicts hash" do expect(modifiers).to eq( - { "$push" => { - "addresses.0.locations" => {'$each' => [{ "street" => "Bond St" }]}}, - conflicts: { "$push" => - { "addresses" => { '$each' => [ + { "$pushAll" => { + "addresses.0.locations" => [{ "street" => "Bond St" }]}, + conflicts: { "$pushAll" => + { "addresses" => [ { "street" => "Oxford St" } - ] } + ] } } } ) end