Merge pull request #3203 from luisramos0/2-0-fix-prod-images-delete

[Spree Upgrade] Fix product properties and images deletion
This commit is contained in:
Maikel
2018-12-14 11:54:05 +11:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
Spree::Admin::ImagesController.class_eval do
# This will make resource controller redirect correctly after deleting product images.
# This can be removed after upgrading to Spree 2.1.
# See here https://github.com/spree/spree/commit/334a011d2b8e16355e4ae77ae07cd93f7cbc8fd1
belongs_to 'spree/product', :find_by => :permalink
end

View File

@@ -210,7 +210,7 @@ feature %q{
page.should have_field 'product_product_properties_attributes_0_value', with: 'fooval'
# And I delete the property
page.all('a.remove_fields').first.click
page.all('a.delete-resource').first.click
click_button 'Update'
# Then the property should have been deleted