diff --git a/app/controllers/spree/admin/products_controller.rb b/app/controllers/spree/admin/products_controller.rb index 17d4487560..cce9b363c8 100644 --- a/app/controllers/spree/admin/products_controller.rb +++ b/app/controllers/spree/admin/products_controller.rb @@ -76,7 +76,7 @@ module Spree product_set.collection.each { |p| authorize! :update, p } - if product_set.save + if product_set.save && product_set.errors.empty? redirect_to main_app.bulk_products_api_v0_products_path(bulk_index_query) elsif product_set.errors.present? render json: { errors: product_set.errors }, status: :bad_request diff --git a/spec/system/admin/bulk_product_update_spec.rb b/spec/system/admin/bulk_product_update_spec.rb index 5d49e19b3a..4d65ac78a7 100644 --- a/spec/system/admin/bulk_product_update_spec.rb +++ b/spec/system/admin/bulk_product_update_spec.rb @@ -303,7 +303,6 @@ describe ' end it "creating a variant with unit value is: '120g' and 'on_hand' filled" do - pending "#9068" within "tr#v_#{Spree::Variant.second.id}" do page.find(".add-variant").click end @@ -315,11 +314,10 @@ describe ' end click_button 'Save Changes', match: :first - expect(page.find("#status-message")).to have_content "Changes saved." + expect(page.find("#status-message")).to have_content "Unit value can't be blank Unit value is not a number" end it "creating a variant with unit value is: '120g' and 'on_demand' checked" do - pending "#9068" within "tr#v_#{Spree::Variant.second.id}" do page.find(".add-variant").click end @@ -331,7 +329,7 @@ describe ' end click_button 'Save Changes', match: :first - expect(page.find("#status-message")).to have_content "Changes saved." + expect(page.find("#status-message")).to have_content "Unit value can't be blank Unit value is not a number" end end end