From 3748c3f61eaff2d834496a0979025b932030d7c9 Mon Sep 17 00:00:00 2001 From: ICS-Asan Date: Tue, 19 Oct 2021 20:44:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20checkEnoughStock=E1=84=92=E1=85=A1?= =?UTF-8?q?=E1=86=B7=E1=84=89=E1=85=AE=20guard=20=E1=84=8C=E1=85=A9?= =?UTF-8?q?=E1=84=80=E1=85=A5=E1=86=AB=E1=84=87=E1=85=AE=20=E1=84=89?= =?UTF-8?q?=E1=85=AE=E1=84=8C=E1=85=A5=E1=86=BC=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 재고랑과 필요수량이 같은 경우를 누락하여 등호 추가 --- JuiceMaker/JuiceMaker/Model/FruitStore.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JuiceMaker/JuiceMaker/Model/FruitStore.swift b/JuiceMaker/JuiceMaker/Model/FruitStore.swift index a2df425c6..7c98e38f9 100644 --- a/JuiceMaker/JuiceMaker/Model/FruitStore.swift +++ b/JuiceMaker/JuiceMaker/Model/FruitStore.swift @@ -63,7 +63,7 @@ class FruitStore { } func checkEnoughStock(from index: Int, for count: Int) throws { - guard inventory[index].count > count else { + guard inventory[index].count >= count else { throw FruitStoreError.lackOfStock(stockNeeded: count - inventory[index].count) } }