15 lines
295 B
Go
15 lines
295 B
Go
|
package jsons
|
||
|
|
||
|
//import "time"
|
||
|
import "testing"
|
||
|
|
||
|
func TestTimestampJson(t *testing.T) {
|
||
|
//wantStr := "Thu Jan 18 2024 17:33:01 GMT+0300"
|
||
|
gotStr := "1705588381"
|
||
|
got := Timestamp(0)
|
||
|
err := got.UnmarshalJSON([]byte(gotStr))
|
||
|
if err != nil {
|
||
|
t.Errorf("JSON unmarshalling error: %s", err)
|
||
|
}
|
||
|
}
|