timestamp_test.go 295 B

1234567891011121314
  1. package jsons
  2. //import "time"
  3. import "testing"
  4. func TestTimestampJson(t *testing.T) {
  5. //wantStr := "Thu Jan 18 2024 17:33:01 GMT+0300"
  6. gotStr := "1705588381"
  7. got := Timestamp(0)
  8. err := got.UnmarshalJSON([]byte(gotStr))
  9. if err != nil {
  10. t.Errorf("JSON unmarshalling error: %s", err)
  11. }
  12. }