mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Rename update_attributes to update #rails4
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user