From 4442557b164f873815727263accebf26f9bc6086 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 7 Nov 2020 14:14:27 +0000 Subject: [PATCH] Fix broken variant weight assignment in spec OrderManagement::Stock::Packer builds a package with all the items Failure/Error: expect(package.weight).to be_positive expected `0.0 (#).positive?` to be truthy, got false # ./engines/order_management/spec/services/order_management/stock/packer_spec.rb:19:in `block (2 levels) in ' --- .../spec/services/order_management/stock/packer_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/order_management/spec/services/order_management/stock/packer_spec.rb b/engines/order_management/spec/services/order_management/stock/packer_spec.rb index 1100090af08..5a3d76b22c3 100644 --- a/engines/order_management/spec/services/order_management/stock/packer_spec.rb +++ b/engines/order_management/spec/services/order_management/stock/packer_spec.rb @@ -10,7 +10,7 @@ module Stock subject { Packer.new(stock_location, order) } - before { order.line_items.first.variant.update(weight: 1) } + before { order.line_items.first.variant.weight = 1 } it 'builds a package with all the items' do package = subject.package