Fix rubocop warning

This commit is contained in:
Gaetan Craig-Riou
2023-11-03 16:46:42 +11:00
committed by David Cook
parent 11ee4b30c2
commit f76bdf0c6f
2 changed files with 3 additions and 4 deletions

View File

@@ -2,8 +2,7 @@
module DfcProvider
class SuppliedProduct < DataFoodConsortium::Connector::SuppliedProduct
attr_accessor :spree_product_id
attr_accessor :image
attr_accessor :spree_product_id, :image
def initialize(semantic_id, spree_product_id: nil, image_url: nil, **properties)
super(semantic_id, **properties)
@@ -16,7 +15,7 @@ module DfcProvider
end
# Temporary solution, will be replaced by "dfc_b:image" in future version of the DFC connector
registerSemanticProperty("ofn:image") do
self.image
image
end
end
end

View File

@@ -49,7 +49,7 @@ describe SuppliedProductBuilder do
end
it "assigns an image_url type" do
image = Spree::Image.create!(
Spree::Image.create!(
attachment: white_logo_file,
viewable_id: variant.product.id,
viewable_type: 'Spree::Product'