Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix Spree::ProductProperty model spec

Szymon Iwaczccc85e58d9a3
diff --git a/core/spec/models/spree/product_property_spec.rb b/core/spec/models/spree/product_property_spec.rb
index 541f6c060a..f57bd4b089 100644
--- a/core/spec/models/spree/product_property_spec.rb
+++ b/core/spec/models/spree/product_property_spec.rb
@@ -5,7 +5,7 @@ describe Spree::ProductProperty, type: :model do
let!(:product_property) { create(:product_property) }
it 'should not create duplicated property for product' do
- duplicated_property = described_class.new(product_id: product_property.product_id, property_id: product_property.id)
+ duplicated_property = product_property.product.product_properties.new(property: product_property.property)
expect(duplicated_property.save).to be_falsy
expect(duplicated_property.errors.messages).to have_key(:property_id)