Rename update_attributes to update #rails4

This commit is contained in:
Luis Ramos
2020-06-22 13:15:36 +01:00
parent 8a61257547
commit f848a89a00
62 changed files with 168 additions and 168 deletions

View File

@@ -27,7 +27,7 @@ describe Admin::ProxyOrdersController, type: :controller do
context 'as an enterprise user' do
context "without authorisation" do
let!(:shop2) { create(:distributor_enterprise) }
before { shop2.update_attributes(owner: user) }
before { shop2.update(owner: user) }
it 'redirects to unauthorized' do
spree_put :cancel, params
@@ -36,7 +36,7 @@ describe Admin::ProxyOrdersController, type: :controller do
end
context "with authorisation" do
before { shop.update_attributes(owner: user) }
before { shop.update(owner: user) }
context "when cancellation succeeds" do
it 'renders the cancelled proxy_order as json' do
@@ -49,7 +49,7 @@ describe Admin::ProxyOrdersController, type: :controller do
end
context "when cancellation fails" do
before { order_cycle.update_attributes(orders_close_at: 1.day.ago) }
before { order_cycle.update(orders_close_at: 1.day.ago) }
it "shows an error" do
spree_get :cancel, params
@@ -96,7 +96,7 @@ describe Admin::ProxyOrdersController, type: :controller do
context 'as an enterprise user' do
context "without authorisation" do
let!(:shop2) { create(:distributor_enterprise) }
before { shop2.update_attributes(owner: user) }
before { shop2.update(owner: user) }
it 'redirects to unauthorized' do
spree_put :resume, params
@@ -105,7 +105,7 @@ describe Admin::ProxyOrdersController, type: :controller do
end
context "with authorisation" do
before { shop.update_attributes(owner: user) }
before { shop.update(owner: user) }
context "when resuming succeeds" do
it 'renders the resumed proxy_order as json' do
@@ -118,7 +118,7 @@ describe Admin::ProxyOrdersController, type: :controller do
end
context "when resuming fails" do
before { order_cycle.update_attributes(orders_close_at: 1.day.ago) }
before { order_cycle.update(orders_close_at: 1.day.ago) }
it "shows an error" do
spree_get :resume, params