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)