datetime_test.go 411 B

12345678910111213141516171819202122232425
  1. package model
  2. import (
  3. "testing"
  4. )
  5. func TestNewDateTimeIn(t *testing.T) {
  6. tests := []struct {
  7. seconds int64
  8. want DateTime
  9. }{
  10. {
  11. seconds: 1692324600,
  12. want: 1692324600 * 1000,
  13. },
  14. }
  15. for _, tt := range tests {
  16. t.Run("NewDateTimeIn", func(t *testing.T) {
  17. if got := NewDateTimeIn(tt.seconds); got != tt.want {
  18. t.Errorf("NewDateTimeIn() = %v, want %v", got, tt.want)
  19. }
  20. })
  21. }
  22. }