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

Function TestNameIDFormat

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

Source from the content-addressed store, hash-verified

35}
36
37func TestNameIDFormat(t *testing.T) {
38 var emptyString string
39 el := NameIDPolicy{
40 Format: &emptyString,
41 }
42 doc := etree.NewDocument()
43 doc.SetRoot(el.Element())
44 x, err := doc.WriteToBytes()
45 assert.Check(t, err)
46 assert.Check(t, is.Equal("<samlp:NameIDPolicy/>",
47 string(x)))
48}
49
50func TestAuthnStatementXMLRoundTrip(t *testing.T) {
51 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