Sha256: 05379545627cfda9c317a28854aea42d04c156648e5995fe7cfe08816dedaba1
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
require "spec_helper" require "cancan" require "spree/testing_support/bar_ability" describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do context "with authorization" do stub_authorization! let(:order) do mock_model( Spree::Order, total: 100, number: "R123456789", billing_address: mock_model(Spree::Address) ) end before do allow(Spree::Order).to receive_message_chain(:friendly, :find).and_return(order) end context "#update" do it "does refresh the shipment rates with all shipping methods" do allow(order).to receive_messages(update_attributes: true) allow(order).to receive_messages(next: false) expect(order).to receive(:refresh_shipment_rates) .with(Spree::ShippingMethod::DISPLAY_ON_FRONT_AND_BACK_END) attributes = { order_id: order.number, order: { email: "", use_billing: "", bill_address_attributes: {}, ship_address_attributes: {} } } spree_put :update, attributes end end end end
Version data entries
6 entries across 6 versions & 1 rubygems