diff --git a/doc/demo/step1-order-confirmed.png b/doc/demo/step1-order-confirmed.png deleted file mode 100644 index 02efc71ffc..0000000000 Binary files a/doc/demo/step1-order-confirmed.png and /dev/null differ diff --git a/doc/demo/step2-after-cancel.png b/doc/demo/step2-after-cancel.png deleted file mode 100644 index 881996e1fc..0000000000 Binary files a/doc/demo/step2-after-cancel.png and /dev/null differ diff --git a/spec/controllers/spree/orders_controller_spec.rb b/spec/controllers/spree/orders_controller_spec.rb index 88b4bbb523..c6528315e3 100644 --- a/spec/controllers/spree/orders_controller_spec.rb +++ b/spec/controllers/spree/orders_controller_spec.rb @@ -473,9 +473,9 @@ RSpec.describe Spree::OrdersController do end it "cancels the order and redirects to the order page" do + request.env['HTTP_REFERER'] = order_path(order) spree_put :cancel, params - expect(response).to have_http_status(:found) expect(response.body).to match(order_path(order)).and match("redirect") expect(flash[:success]).to eq 'Your order has been cancelled' end @@ -486,9 +486,9 @@ RSpec.describe Spree::OrdersController do context "when the order is not yet complete" do it "responds with forbidden" do + request.env['HTTP_REFERER'] = order_path(order) spree_put :cancel, params - expect(response).to have_http_status(:found) expect(response.body).to match(order_path(order)).and match("redirect") expect(flash[:error]).to eq 'Sorry, the order could not be cancelled' end @@ -501,9 +501,9 @@ RSpec.describe Spree::OrdersController do } it "responds with success" do + request.env['HTTP_REFERER'] = order_path(order) spree_put :cancel, params - expect(response).to have_http_status(:found) expect(response.body).to match(order_path(order)).and match("redirect") expect(flash[:success]).to eq 'Your order has been cancelled' end