Merge pull request #3641 from luisramos0/2-0-update-spree-2-0-4-revision

[Spree Upgrade] Update spree revision to include last package_factory fix
This commit is contained in:
Luis Ramos
2019-04-12 22:16:15 +01:00
committed by GitHub
3 changed files with 14 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ GIT
GIT
remote: https://github.com/openfoodfoundation/spree.git
revision: f55722b38db7e706a8521c9091a0e00119bb4d20
revision: 060d0a5d8b31f68990fa792e0e88910c742d9a96
branch: 2-0-4-stable
specs:
spree (2.0.4)

View File

@@ -25,7 +25,9 @@ describe Spree::Api::ShipmentsController, type: :controller do
let(:error_message) { "broken shipments creation" }
before do
order.update_attribute(:ship_address_id, order_ship_address.id)
order.update_attribute :ship_address_id, order_ship_address.id
order.update_attribute :distributor, variant.product.supplier
shipment.shipping_method.distributors << variant.product.supplier
end
sign_in_as_admin!
@@ -56,6 +58,7 @@ describe Spree::Api::ShipmentsController, type: :controller do
it 'updates existing shipment with variant override if an VO is sent' do
hub = create(:distributor_enterprise)
order.update_attribute(:distributor, hub)
shipment.shipping_method.distributors << hub
variant_override = create(:variant_override, hub: hub, variant: variant)
spree_post :create, params

View File

@@ -219,7 +219,9 @@ feature %q{
end
feature "viewing the edit page" do
let!(:different_shipping_method) { create(:shipping_method, name: "Different Shipping Method") }
let!(:shipping_method_for_distributor1) { create(:shipping_method, name: "Normal", distributors: [distributor1]) }
let!(:different_shipping_method_for_distributor1) { create(:shipping_method, name: "Different", distributors: [distributor1]) }
let!(:shipping_method_for_distributor2) { create(:shipping_method, name: "Other", distributors: [distributor2]) }
background do
Spree::Config[:enable_receipt_printing?] = true
@@ -227,10 +229,12 @@ feature %q{
distributor1.update_attribute(:abn, '12345678')
@order = create(:order_with_taxes,
distributor: distributor1,
ship_address: create(:address),
product_price: 110,
tax_rate_amount: 0.1,
tax_rate_name: "Tax 1")
Spree::TaxRate.adjust(@order)
@order.update_shipping_fees!
visit spree.edit_admin_order_path(@order)
end
@@ -288,14 +292,14 @@ feature %q{
end
scenario "can edit shipping method" do
expect(page).to_not have_content different_shipping_method.name
expect(page).to_not have_content different_shipping_method_for_distributor1.name
find('.edit-method').click
expect(page).to have_select2 'selected_shipping_rate_id', with_options: [different_shipping_method.name]
select2_select different_shipping_method.name, from: 'selected_shipping_rate_id'
expect(page).to have_select2 'selected_shipping_rate_id', with_options: [shipping_method_for_distributor1.name, different_shipping_method_for_distributor1.name], without_options: [shipping_method_for_distributor2.name]
select2_select different_shipping_method_for_distributor1.name, from: 'selected_shipping_rate_id'
find('.save-method').click
expect(page).to have_content different_shipping_method.name
expect(page).to have_content different_shipping_method_for_distributor1.name
end
scenario "can edit tracking number" do