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.

Add unique code to tests.

Matthew Kennedyf55da187cbb0
diff --git a/core/lib/spree/testing_support/factories/menu_item.rb b/core/lib/spree/testing_support/factories/menu_item.rb
index 7b9a58abf1..5868f33501 100644
--- a/core/lib/spree/testing_support/factories/menu_item.rb
+++ b/core/lib/spree/testing_support/factories/menu_item.rb
@@ -3,6 +3,7 @@ FactoryBot.define do
name { 'Link To Somewhere' }
item_type { 'Link' }
subtitle { 'Some Descriptive Text!' }
+ unique_code { generate(:random_string) }
linked_resource_type { 'URL' }
url { 'https://test.spree.com' }
end