Fix time zone in tests

This commit is contained in:
Daniel J. Summers 2023-05-25 19:45:28 -04:00
parent 14608de5be
commit 370fbb0c3e
2 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View File

@ -334,4 +334,5 @@ src/PrayerTracker/appsettings.json
docs/_site
**/*.db*
.ionide
.ionide
.vscode

View File

@ -604,7 +604,7 @@ let requestListTests =
}
let html = htmlList.AsHtml _s
let expected =
htmlList.Requests[0].UpdatedDate.InUtc().Date.ToString ("d", null)
htmlList.Requests[0].UpdatedDate.InZone(SmallGroup.timeZone reqList.SmallGroup).Date.ToString ("d", null)
|> sprintf """<strong>Zeb</strong> &ndash; zyx<i style="font-size:9.60pt">&nbsp; (as of %s)</i>"""
// spot check; if one request has it, they all should
Expect.stringContains html expected "Expected short as-of date not found"
@ -619,7 +619,7 @@ let requestListTests =
}
let html = htmlList.AsHtml _s
let expected =
htmlList.Requests[0].UpdatedDate.InUtc().Date.ToString ("D", null)
htmlList.Requests[0].UpdatedDate.InZone(SmallGroup.timeZone reqList.SmallGroup).Date.ToString ("D", null)
|> sprintf """<strong>Zeb</strong> &ndash; zyx<i style="font-size:9.60pt">&nbsp; (as of %s)</i>"""
// spot check; if one request has it, they all should
Expect.stringContains html expected "Expected long as-of date not found"