mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +00:00
Multiply by unit_value as sumOfUnitValues is now scaled
This commit is contained in:
@@ -171,8 +171,14 @@ describe "LineItemsCtrl", ->
|
||||
|
||||
it "returns the quantity of fulfilled group buy units", ->
|
||||
scope.selectedUnitsProduct = { variant_unit: "weight", group_buy_unit_size: 1000 }
|
||||
scope.selectedUnitsVariant = { unit_value: 1 }
|
||||
expect(scope.fulfilled(1500)).toEqual 1.5
|
||||
|
||||
it "returns the quantity of fulfilled group buy units by volume", ->
|
||||
scope.selectedUnitsProduct = { variant_unit: "volume", group_buy_unit_size: 5000 }
|
||||
scope.selectedUnitsVariant = { unit_value: 1000 }
|
||||
expect(scope.fulfilled(5)).toEqual 1
|
||||
|
||||
describe "allFinalWeightVolumesPresent()", ->
|
||||
it "returns false if the unit_value of any item in filteredLineItems does not exist", ->
|
||||
scope.filteredLineItems = [
|
||||
|
||||
Reference in New Issue
Block a user