snapshot of https://github.com/traggo/server.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
build / build (push) Failing after 3s

This commit is contained in:
upstream-mirror
2026-09-16 05:24:45 +05:00
commit cda7c1a474
272 changed files with 31973 additions and 0 deletions

51
test/time_test.go Normal file
View File

@@ -0,0 +1,51 @@
package test
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTime_panics(t *testing.T) {
assert.Panics(t, func() {
Time("asds")
})
}
func TestTime_succeeds(t *testing.T) {
Time("2009-06-30T18:30:00+02:00")
}
func TestModelTime_panics(t *testing.T) {
assert.Panics(t, func() {
ModelTime("asds")
})
}
func TestModelTime_succeeds(t *testing.T) {
ModelTime("2009-06-30T18:30:00+02:00")
}
func TestTimeP_panics(t *testing.T) {
assert.Panics(t, func() {
TimeP("asds")
})
}
func TestTimeP_succeeds(t *testing.T) {
TimeP("2009-06-30T18:30:00+02:00")
}
func TestModelTimeP_panics(t *testing.T) {
assert.Panics(t, func() {
ModelTimeP("asds")
})
}
func TestModelTimeP_succeeds(t *testing.T) {
ModelTimeP("2009-06-30T18:30:00+02:00")
}
func TestModelTimeUTC_succeeds(t *testing.T) {
ModelTimeUTC("2009-06-30T18:30:00+02:00")
}