20 lines
368 B
Go
20 lines
368 B
Go
|
package cif
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func TestIsSameDay(t *testing.T) {
|
||
|
today := time.Now()
|
||
|
notToday := time.Date(2024, 01, 23, 23, 01, 3, 421, time.Local)
|
||
|
|
||
|
if !isSameToday(today) {
|
||
|
t.Errorf("Error in isSameDay(today). Expected true, got false.")
|
||
|
}
|
||
|
|
||
|
if isSameToday(notToday) {
|
||
|
t.Errorf("Error in isSameDay(notToday). Expected false, got true.")
|
||
|
}
|
||
|
}
|