diff --git a/spec/controllers/line_items_controller_spec.rb b/spec/controllers/line_items_controller_spec.rb index 0693f6f3d1..7e215d337e 100644 --- a/spec/controllers/line_items_controller_spec.rb +++ b/spec/controllers/line_items_controller_spec.rb @@ -55,7 +55,7 @@ describe LineItemsController, type: :controller do context "where the item's order is associated with the current user" do before do - order.update_attributes!(user_id: user.id) + order.update!(user_id: user.id) allow(controller).to receive_messages spree_current_user: item.order.user end @@ -67,7 +67,7 @@ describe LineItemsController, type: :controller do end context "with an order cycle and distributor" do - before { order.update_attributes!(order_cycle_id: order_cycle.id, distributor_id: distributor.id) } + before { order.update!(order_cycle_id: order_cycle.id, distributor_id: distributor.id) } context "where changes are not allowed" do it "denies deletion" do @@ -77,7 +77,7 @@ describe LineItemsController, type: :controller do end context "where changes are allowed" do - before { distributor.update_attributes!(allow_order_changes: true) } + before { distributor.update!(allow_order_changes: true) } it "deletes the line item" do delete :destroy, params: params diff --git a/spec/controllers/spree/orders_controller_spec.rb b/spec/controllers/spree/orders_controller_spec.rb index ab29573117..2d08ae5fce 100644 --- a/spec/controllers/spree/orders_controller_spec.rb +++ b/spec/controllers/spree/orders_controller_spec.rb @@ -533,7 +533,7 @@ describe Spree::OrdersController, type: :controller do end before do - order.update_attributes!(order_cycle_id: order_cycle.id, distributor_id: distributor.id) + order.update!(order_cycle_id: order_cycle.id, distributor_id: distributor.id) end it "returns the order" do diff --git a/spec/features/consumer/shopping/orders_spec.rb b/spec/features/consumer/shopping/orders_spec.rb index d13b57ac68..0050e66fcf 100644 --- a/spec/features/consumer/shopping/orders_spec.rb +++ b/spec/features/consumer/shopping/orders_spec.rb @@ -26,7 +26,7 @@ feature "Order Management", js: true do before do # For some reason, both bill_address and ship_address are not set # automatically. - order.update_attributes!( + order.update!( bill_address: bill_address, ship_address: ship_address )