func TestClaimsBasic(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing claims basic functions handling")
	// First with uninitialised claims.
	var claims jwt.Claims
	ok := claims.Contains("foo")
	assert.False(ok)
	nothing, ok := claims.Get("foo")
	assert.Nil(nothing)
	assert.False(ok)
	old := claims.Set("foo", "bar")
	assert.Nil(old)
	old = claims.Delete("foo")
	assert.Nil(old)
	// Now initialise it.
	claims = jwt.NewClaims()
	ok = claims.Contains("foo")
	assert.False(ok)
	nothing, ok = claims.Get("foo")
	assert.Nil(nothing)
	assert.False(ok)
	old = claims.Set("foo", "bar")
	assert.Nil(old)
	ok = claims.Contains("foo")
	assert.True(ok)
	foo, ok := claims.Get("foo")
	assert.Equal(foo, "bar")
	assert.True(ok)
	old = claims.Set("foo", "yadda")
	assert.Equal(old, "bar")
	// Finally delete it.
	old = claims.Delete("foo")
	assert.Equal(old, "yadda")
	old = claims.Delete("foo")
	assert.Nil(old)
	ok = claims.Contains("foo")
	assert.False(ok)
}
// TestClaimsBasic tests the low level operations
// on claims.
TestClaimsBasic tests the low level operations
on claims.
// TestClaimsBasic tests the low level operations // on claims .
func TestClaimsBasic(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	assert.Logf("testing claims basic functions handling")
	var claims jwt.Claims
	ok := claims.Contains("foo")
	assert.False(ok)
	nothing, ok := claims.Get("foo")
	assert.Nil(nothing)
	assert.False(ok)
	old := claims.Set("foo", "bar")
	assert.Nil(old)
	old = claims.Delete("foo")
	assert.Nil(old)
	claims = jwt.NewClaims()
	ok = claims.Contains("foo")
	assert.False(ok)
	nothing, ok = claims.Get("foo")
	assert.Nil(nothing)
	assert.False(ok)
	old = claims.Set("foo", "bar")
	assert.Nil(old)
	ok = claims.Contains("foo")
	assert.True(ok)
	foo, ok := claims.Get("foo")
	assert.Equal(foo, "bar")
	assert.True(ok)
	old = claims.Set("foo", "yadda")
	assert.Equal(old, "bar")
	old = claims.Delete("foo")
	assert.Equal(old, "yadda")
	old = claims.Delete("foo")
	assert.Nil(old)
	ok = claims.Contains("foo")
	assert.False(ok)
}
func TestClaimsBasic ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) assert . Logf ( " " ) var claims jwt . Claims ok := claims . Contains ( " " ) assert . False ( ok ) nothing , ok := claims . Get ( " " ) assert . Nil ( nothing ) assert . False ( ok ) old := claims . Set ( " " , " " ) assert . Nil ( old ) old = claims . Delete ( " " ) assert . Nil ( old ) claims = jwt . NewClaims ( ) ok = claims . Contains ( " " ) assert . False ( ok ) nothing , ok = claims . Get ( " " ) assert . Nil ( nothing ) assert . False ( ok ) old = claims . Set ( " " , " " ) assert . Nil ( old ) ok = claims . Contains ( " " ) assert . True ( ok ) foo , ok := claims . Get ( " " ) assert . Equal ( foo , " " ) assert . True ( ok ) old = claims . Set ( " " , " " ) assert . Equal ( old , " " ) old = claims . Delete ( " " ) assert . Equal ( old , " " ) old = claims . Delete ( " " ) assert . Nil ( old ) ok = claims . Contains ( " " ) assert . False ( ok ) }
TestClaimsBasic tests the low level operations
on claims.
TestClaimsBasic tests the low level operations on claims .
// First with uninitialised claims. // Now initialise it. // Finally delete it.