Skip to content

Commit

Permalink
fix: TodayController use calculated day in view
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Oct 25, 2023
1 parent b383919 commit 756e0d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grails-app/controllers/rooms/TodayController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TodayController {
if (offset < 0 ) {
offsetIsWrong = "error"
} else {
today.plusDays(offset);
today = today.plusDays(offset)
}
render view:"TodayView", model: [day: today.toString(), offsetClass: offsetIsWrong]
}
Expand Down
2 changes: 1 addition & 1 deletion src/integration-test/groovy/rooms/TodaySpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class TodaySpec extends GebSpec {
go '/today/show'
then:
title == "Today"
$("output").text().endsWith("2023")
$("output").text().startsWith("2023")
}
}

0 comments on commit 756e0d4

Please sign in to comment.