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

Function TestSimpleSignMessageWithoutRootElement

no_root_test.go:21–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestSimpleSignMessageWithoutRootElement(t *testing.T) {
22 e := spcovSetup(t)
23 m := simpleSignMsg{param: "SAMLResponse", xml: []byte("<!-- nothing -->"), sigAlg: dsig.RSASHA256SignatureMethod, key: e.idpKey}
24 req := simpleSignPost(t, e.sp.SloURL.String(), m.values(t))
25 req.Method = http.MethodPost
26 assert.Check(t, is.Error(spcovPrivateErr(t, e.sp.ValidateLogoutResponseRequest(req)), "invalid xml: no root"))
27}

Callers

nothing calls this directly

Calls 7

valuesMethod · 0.95
spcovSetupFunction · 0.85
simpleSignPostFunction · 0.85
spcovPrivateErrFunction · 0.85
StringMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected