Skip to content

Commit

Permalink
Fixed SetTime test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiljohn10 committed Nov 25, 2022
1 parent 444745f commit 99e68f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ func TestGetTime(t *testing.T) {
func TestSetTime(t *testing.T) {
trans := Transaction{}
trans.SetTime(ISTDATETIMEFORMAT, "30/12/2021 23:22:21 +0530")
want, _ := time.Parse(ISTDATETIMEFORMAT, "30/12/2021 23:22:21 +0530")
if trans.Date != want {
t.Fatalf("got %v, wanted %v", trans.Date, want)
got := trans.GetTime()
want := "30/12/2021 23:22:21 +0530"
if got != want {
t.Fatalf("got %v, wanted %v", got, want)
}
}

Expand Down

0 comments on commit 99e68f3

Please sign in to comment.