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

Function TestArtifactResolveSoapRequest

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

Source from the content-addressed store, hash-verified

136}
137
138func TestArtifactResolveSoapRequest(t *testing.T) {
139 issueInstant := time.Date(2020, 7, 21, 12, 30, 45, 0, time.UTC)
140 expected := ArtifactResolve{
141 ID: "index",
142 Version: "version",
143 IssueInstant: issueInstant,
144 // Signature *etree.Element
145 }
146
147 doc := etree.NewDocument()
148 doc.SetRoot(expected.SoapRequest())
149 x, err := doc.WriteToBytes()
150 assert.Check(t, err)
151 assert.Check(t, is.Equal(`<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><samlp:ArtifactResolve xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="index" Version="version" IssueInstant="2020-07-21T12:30:45Z"><samlp:Artifact/></samlp:ArtifactResolve></soapenv:Body></soapenv:Envelope>`,
152 string(x)))
153}
154
155func TestArtifactResponseElement(t *testing.T) {
156 issueInstant := time.Date(2020, 7, 21, 12, 30, 45, 0, time.UTC)

Callers

nothing calls this directly

Calls 1

SoapRequestMethod · 0.95

Tested by

no test coverage detected