From 4de4cc642db7d4e1fd4b03c8cd8b464937d6add9 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sun, 23 Aug 2020 15:47:12 +0100 Subject: [PATCH] Fix stock location factory --- spec/factories/stock_location_factory.rb | 3 --- spec/services/default_stock_location_spec.rb | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/spec/factories/stock_location_factory.rb b/spec/factories/stock_location_factory.rb index 46cd0a2f4a..452176fae1 100644 --- a/spec/factories/stock_location_factory.rb +++ b/spec/factories/stock_location_factory.rb @@ -1,8 +1,5 @@ FactoryBot.define do factory :stock_location, class: Spree::StockLocation do - # Ensures the name attribute is not assigned after instantiating the default location - transient { name 'default' } - # keeps the test stock_location unique initialize_with { DefaultStockLocation.find_or_create } diff --git a/spec/services/default_stock_location_spec.rb b/spec/services/default_stock_location_spec.rb index 52ee7680ca..7423d97293 100644 --- a/spec/services/default_stock_location_spec.rb +++ b/spec/services/default_stock_location_spec.rb @@ -22,7 +22,7 @@ describe DefaultStockLocation do describe '.destroy_all' do it "removes all stock locations named 'default'" do - create(:stock_location, name: 'default') + create(:stock_location) expect { described_class.destroy_all } .to change { Spree::StockLocation.count }.to(0)