Add test foundations (#14)

This commit is contained in:
Malachi Soord
2021-06-08 14:13:22 +02:00
committed by GitHub
parent c9f97d42bf
commit e611bf2ac4
3 changed files with 22 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
// +build unit
package utils
import (
"testing"
"time"
)
func TestGetSQLiteFormattedDateTime(t *testing.T) {
datetime := time.Date(2021, time.Month(1), 01, 1, 30, 15, 0, time.UTC)
result := GetSQLiteFormattedDateTime(datetime)
if result != "2021-01-01 01:30:15" {
t.Log("Expected 2021-01-01 01:30:15 but got ", result)
t.Fail()
}
}