Skip to content

Commit

Permalink
add one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
derinil committed Sep 28, 2022
1 parent 23f31d1 commit 6311efb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions datetime/period_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func TestContainsDate(t *testing.T) {
ret: true,
},
{
name: "begin in 1 hour period and infinite time",
name: "2 hour period and infinite time",
p: datetime.Period{
Begin: time.Now().Add(-time.Hour),
End: time.Now().Add(time.Hour),
Expand All @@ -308,14 +308,23 @@ func TestContainsDate(t *testing.T) {
ret: false,
},
{
name: "begin in 1 hour period and now time",
name: "2 hour period and now time",
p: datetime.Period{
Begin: time.Now().Add(-time.Hour),
End: time.Now().Add(time.Hour),
},
t: time.Now(),
ret: true,
},
{
name: "begin in 1 hour period and now time",
p: datetime.Period{
Begin: time.Now().Add(time.Hour),
End: time.Now().Add(time.Hour),
},
t: time.Now(),
ret: false,
},
}

for _, c := range testCases {
Expand Down

0 comments on commit 6311efb

Please sign in to comment.