(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func 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 | |
| 53 | func TestAuthnStatementXMLRoundTrip(t *testing.T) { |
| 54 | authnInstant := time.Date(2020, 7, 21, 12, 30, 45, 0, time.UTC) |