func TestClaimsTime(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing claims time handling")
	goLaunch := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
	claims := jwt.NewClaims()
	claims.SetTime("foo", goLaunch)
	claims.Set("bar", goLaunch.Unix())
	claims.Set("baz", goLaunch.Format(time.RFC3339))
	claims.Set("yadda", "nope")
	foo, ok := claims.GetTime("foo")
	assert.Equal(foo.Unix(), goLaunch.Unix())
	assert.True(ok)
	bar, ok := claims.GetTime("bar")
	assert.Equal(bar.Unix(), goLaunch.Unix())
	assert.True(ok)
	baz, ok := claims.GetTime("baz")
	assert.Equal(baz.Unix(), goLaunch.Unix())
	assert.True(ok)
	yadda, ok := claims.GetTime("yadda")
	assert.Equal(yadda, time.Time{})
	assert.False(ok)
}
// TestClaimsTime tests the time operations
// on claims.
TestClaimsTime tests the time operations
on claims.
// TestClaimsTime tests the time operations // on claims .
func TestClaimsTime(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing claims time handling")
	goLaunch := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
	claims := jwt.NewClaims()
	claims.SetTime("foo", goLaunch)
	claims.Set("bar", goLaunch.Unix())
	claims.Set("baz", goLaunch.Format(time.RFC3339))
	claims.Set("yadda", "nope")
	foo, ok := claims.GetTime("foo")
	assert.Equal(foo.Unix(), goLaunch.Unix())
	assert.True(ok)
	bar, ok := claims.GetTime("bar")
	assert.Equal(bar.Unix(), goLaunch.Unix())
	assert.True(ok)
	baz, ok := claims.GetTime("baz")
	assert.Equal(baz.Unix(), goLaunch.Unix())
	assert.True(ok)
	yadda, ok := claims.GetTime("yadda")
	assert.Equal(yadda, time.Time{})
	assert.False(ok)
}
func TestClaimsTime ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) assert . Logf ( " " ) goLaunch := time . Date ( 2009 , time . November , 10 , 23 , 0 , 0 , 0 , time . UTC ) claims := jwt . NewClaims ( ) claims . SetTime ( " " , goLaunch ) claims . Set ( " " , goLaunch . Unix ( ) ) claims . Set ( " " , goLaunch . Format ( time . RFC3339 ) ) claims . Set ( " " , " " ) foo , ok := claims . GetTime ( " " ) assert . Equal ( foo . Unix ( ) , goLaunch . Unix ( ) ) assert . True ( ok ) bar , ok := claims . GetTime ( " " ) assert . Equal ( bar . Unix ( ) , goLaunch . Unix ( ) ) assert . True ( ok ) baz , ok := claims . GetTime ( " " ) assert . Equal ( baz . Unix ( ) , goLaunch . Unix ( ) ) assert . True ( ok ) yadda , ok := claims . GetTime ( " " ) assert . Equal ( yadda , time . Time { } ) assert . False ( ok ) }
TestClaimsTime tests the time operations
on claims.
TestClaimsTime tests the time operations on claims .