Skip to content

Commit

Permalink
Merge pull request #358 from Gabriel4357/fix-message-bug-deliveryedit
Browse files Browse the repository at this point in the history
Fix message bug deliveryedit
  • Loading branch information
juliusgambe authored Nov 2, 2023
2 parents 27d8508 + 75bcc0a commit 353965a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static Delivery createEditedDelivery(Model model, Delivery deliveryToEdi
} else {
throw new CommandException(MESSAGE_INVALID_CUSTOMER_DISPLAYED_INDEX);
}
if (!DeliveryDate.isValidDeliveryDate(updatedDeliveryDate.toString())) {
if (!DeliveryDate.isFutureDate(updatedDeliveryDate.toString())) {
throw new CommandException(MESSAGE_INVALID_DELIVERY_DATE);
}
return new Delivery(deliveryToEdit.getDeliveryId(), updatedDeliveryName, updatedCustomer, orderDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public void parse_invalidArgs_throwsParseException() {

// invalid format expected delivery date
assertParseFailure(parser, VALID_NAME_GABRIELS_MILK + CUSTOMER_ID_DESC_MILK

+ INVALID_FORMAT_DELIVERY_DATE_DESC, DeliveryDate.MESSAGE_CONSTRAINTS);

// invalid customer id
Expand Down

0 comments on commit 353965a

Please sign in to comment.