passforios-gopenpgp/crypto/time_test.go
2021-06-16 14:06:07 +02:00

17 lines
285 B
Go

package crypto
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestTime(t *testing.T) {
UpdateTime(1571072494)
time.Sleep(1 * time.Second)
now := GetUnixTime()
assert.Exactly(t, int64(1571072494), now) // Use latest server time
UpdateTime(testTime)
}