MCPcopy Create free account
hub / github.com/crewjam/saml / TestNameIDFormat

Function TestNameIDFormat

schema_test.go:40–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestNameIDFormat(t *testing.T) {
41 var emptyString string
42 el := NameIDPolicy{
43 Format: &emptyString,
44 }
45 doc := etree.NewDocument()
46 doc.SetRoot(el.Element())
47 x, err := doc.WriteToBytes()
48 assert.Check(t, err)
49 assert.Check(t, is.Equal("<samlp:NameIDPolicy/>",
50 string(x)))
51}
52
53func TestAuthnStatementXMLRoundTrip(t *testing.T) {
54 authnInstant := time.Date(2020, 7, 21, 12, 30, 45, 0, time.UTC)

Callers

nothing calls this directly

Calls 1

ElementMethod · 0.95

Tested by

no test coverage detected