Skip to content

Commit

Permalink
Merge pull request #274 from hmrc/ITSASU-3544
Browse files Browse the repository at this point in the history
ITSASU-3544 - Fix day field for pre-pop audit
  • Loading branch information
ymabdulahi authored Dec 17, 2024
2 parents cfc31d5 + 104dc92 commit e79063d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/DateModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case class DateModel(day: String, month: String, year: String) {

private val outputFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("d MMMM uuuu").withResolverStyle(ResolverStyle.STRICT)
private val desFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd").withResolverStyle(ResolverStyle.STRICT)
private val auditFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("uuuu/MM/DD").withResolverStyle(ResolverStyle.STRICT)
private val auditFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("uuuu/MM/dd").withResolverStyle(ResolverStyle.STRICT)

def toLocalDate: LocalDate = LocalDate.of(year.toInt, month.toInt, day.toInt)

Expand Down
4 changes: 2 additions & 2 deletions test/models/PrePopAuditModelSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PrePopAuditModelSpec extends PlaySpec {
),
postcode = Some("ZZ1 1ZZ")
)),
startDate = Some(DateModel("1", "1", "1980")),
startDate = Some(DateModel("12", "12", "1980")),
accountingMethod = Cash
)
)),
Expand Down Expand Up @@ -68,7 +68,7 @@ class PrePopAuditModelSpec extends PlaySpec {
"description" -> "Plumbing",
"addressFirstLine" -> "1 long road",
"addressPostcode" -> "ZZ1 1ZZ",
"startDate" -> "1980/01/01",
"startDate" -> "1980/12/12",
"accountingMethod" -> "cash"
)
),
Expand Down

0 comments on commit e79063d

Please # to comment.