PrincipalName_test.go 349 B

123456789101112131415
  1. package types
  2. import (
  3. "github.com/stretchr/testify/assert"
  4. "testing"
  5. )
  6. func TestPrincipalName_GetSalt(t *testing.T) {
  7. pn := PrincipalName{
  8. NameType: 1,
  9. NameString: []string{"firststring", "secondstring"},
  10. }
  11. assert.Equal(t, "TEST.GOKRB5firststringsecondstring", pn.GetSalt("TEST.GOKRB5"), "Principal name default salt not as expected")
  12. }