1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-03 04:38:38 -04:00

testing: Use Time.Equal for date comparisons

Postgres actually preserves the timezone, unlike sqlite and mysql...
This commit is contained in:
2017-11-17 05:19:27 -05:00
parent 00e1e899c0
commit 50dd7b1d26
2 changed files with 6 additions and 6 deletions

View File

@ -87,8 +87,8 @@ func ensureTransactionsMatch(t *testing.T, expected, tran *handlers.Transaction,
if tran.Description != expected.Description {
t.Errorf("Description doesn't match")
}
if tran.Date != expected.Date {
t.Errorf("Date doesn't match")
if !tran.Date.Equal(expected.Date) {
t.Errorf("Date (%+v) differs from expected (%+v)", tran.Date, expected.Date)
}
if len(tran.Splits) != len(expected.Splits) {