mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
Improve product specs' performance
This commit is contained in:
@@ -40,7 +40,8 @@ module Spree
|
||||
|
||||
it "generates a unique permalink" do
|
||||
product1 = create(:product, name: "Banana Permanenta", permalink: nil)
|
||||
product2 = create(:product, name: "Banana Permanenta", permalink: nil)
|
||||
product2 = build_stubbed(:product, name: "Banana Permanenta", permalink: nil)
|
||||
expect(product2).to be_valid
|
||||
expect(product2.permalink).to_not eq product1.permalink
|
||||
# "banana-permanenta" != "banana-permanenta-1" # generated by Spree
|
||||
end
|
||||
@@ -149,7 +150,7 @@ module Spree
|
||||
end
|
||||
|
||||
context "a basic product" do
|
||||
let(:product) { create(:simple_product) }
|
||||
let(:product) { build_stubbed(:simple_product) }
|
||||
|
||||
it "requires variant unit fields" do
|
||||
product.variant_unit = nil
|
||||
|
||||
Reference in New Issue
Block a user