(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestSPCanProduceMetadataWithEncryptionCert(t *testing.T) { |
| 108 | test := NewServiceProviderTest(t) |
| 109 | s := ServiceProvider{ |
| 110 | Key: test.Key, |
| 111 | Certificate: test.Certificate, |
| 112 | MetadataURL: mustParseURL("https://example.com/saml2/metadata"), |
| 113 | AcsURL: mustParseURL("https://example.com/saml2/acs"), |
| 114 | SloURL: mustParseURL("https://example.com/saml2/slo"), |
| 115 | IDPMetadata: &EntityDescriptor{}, |
| 116 | LogoutBindings: []string{HTTPPostBinding}, |
| 117 | } |
| 118 | err := xml.Unmarshal(test.IDPMetadata, &s.IDPMetadata) |
| 119 | assert.Check(t, err) |
| 120 | |
| 121 | spMetadata, err := xml.MarshalIndent(s.Metadata(), "", " ") |
| 122 | assert.Check(t, err) |
| 123 | golden.Assert(t, string(spMetadata), t.Name()+"_metadata") |
| 124 | } |
| 125 | |
| 126 | func TestSPCanProduceMetadataWithBothCerts(t *testing.T) { |
| 127 | test := NewServiceProviderTest(t) |
nothing calls this directly
no test coverage detected