Skip to content

Commit

Permalink
refactor: edit name of function that send reservation mails
Browse files Browse the repository at this point in the history
  • Loading branch information
woowabrie committed Oct 12, 2023
1 parent 56a5115 commit 5c5c180
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MailMessageService(
mailMessageRepository.deleteById(mailReservation.mailMessageId)
}

fun sendReservedMail(standardTime: LocalDateTime = LocalDateTime.now()) {
fun sendReservedMails(standardTime: LocalDateTime = LocalDateTime.now()) {
val reservations = mailReservationRepository.findByReservationTimeBeforeAndStatus(
standardTime,
MailReservationStatus.WAITING
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/apply/ui/api/MailRestController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MailRestController(
fun sendMail(
@Accessor("mail-scheduler") ignored: Unit
): ResponseEntity<Unit> {
mailMessageService.sendReservedMail()
mailMessageService.sendReservedMails()
return ResponseEntity.noContent().build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class MailMessageIntegrationTest(
mailReservationRepository.save(createMailReservation(mailMessage3.id, reservationTime.plusHours(3)))

When("해당 시간에 메일 발송 요청을 하면") {
mailMessageService.sendReservedMail(reservationTime)
mailMessageService.sendReservedMails(reservationTime)

Then("메일 전송이 완료된다") {
val actual = mailReservationRepository.findByStatus(MailReservationStatus.FINISHED)
Expand Down

0 comments on commit 5c5c180

Please sign in to comment.