| 96 | } |
| 97 | |
| 98 | func TestRequestedAuthnContext(t *testing.T) { |
| 99 | expected := RequestedAuthnContext{ |
| 100 | Comparison: "comparison", |
| 101 | } |
| 102 | |
| 103 | doc := etree.NewDocument() |
| 104 | doc.SetRoot(expected.Element()) |
| 105 | x, err := doc.WriteToBytes() |
| 106 | assert.Check(t, err) |
| 107 | assert.Check(t, is.Equal(`<samlp:RequestedAuthnContext Comparison="comparison"><saml:AuthnContextClassRef/></samlp:RequestedAuthnContext>`, |
| 108 | string(x))) |
| 109 | } |
| 110 | |
| 111 | func TestArtifactResolveElement(t *testing.T) { |
| 112 | issueInstant := time.Date(2020, 7, 21, 12, 30, 45, 0, time.UTC) |