mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
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 (#<BigDecimal:7f156c99fda8,'0.0',9(18)>).positive?` to be truthy, got false
# ./engines/order_management/spec/services/order_management/stock/packer_spec.rb:19:in `block (2 levels) in <module:Stock>'
This commit is contained in:
@@ -10,7 +10,7 @@ module OrderManagement
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user