MCPcopy
hub / github.com/sideshow/apns2 / TestExpiresBeforeAnHour

Function TestExpiresBeforeAnHour

token/token_test.go:64–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestExpiresBeforeAnHour(t *testing.T) {
65 token := &token.Token{
66 IssuedAt: time.Now().Add(-50 * time.Minute).Unix(),
67 }
68 assert.True(t, token.Expired())
69}
70
71func TestGenerateIfExpired(t *testing.T) {
72 authKey, _ := token.AuthKeyFromFile("_fixtures/authkey-valid.p8")

Callers

nothing calls this directly

Calls 2

ExpiredMethod · 0.95
AddMethod · 0.80

Tested by

no test coverage detected