Commit d245f8d2 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

test: fix new unit tests

parent 9ad6ec84
Pipeline #30400 passed with stages
in 6 minutes and 54 seconds
...@@ -71,3 +71,18 @@ func keyshareSessions(t *testing.T, client *irmaclient.Client) { ...@@ -71,3 +71,18 @@ func keyshareSessions(t *testing.T, client *irmaclient.Client) {
sigRequest.AddSingle(irma.NewAttributeTypeIdentifier("test.test.mijnirma.email"), nil, nil) sigRequest.AddSingle(irma.NewAttributeTypeIdentifier("test.test.mijnirma.email"), nil, nil)
sessionHelper(t, sigRequest, "signature", client) sessionHelper(t, sigRequest, "signature", client)
} }
func TestIssuanceCombinedMultiSchemeSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("test.test.mijnirma.email")
request := getCombinedIssuanceRequest(id)
sessionHelper(t, request, "issue", nil)
sessionHelper(t, irma.NewIssuanceRequest([]*irma.CredentialRequest{
{
CredentialTypeID: irma.NewCredentialTypeIdentifier("test.test.email"),
Attributes: map[string]string{
"email": "example@example.com",
},
},
}, irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard.studentID")), "issue", nil)
}
...@@ -59,21 +59,6 @@ func TestIssuanceSession(t *testing.T) { ...@@ -59,21 +59,6 @@ func TestIssuanceSession(t *testing.T) {
sessionHelper(t, request, "issue", nil) sessionHelper(t, request, "issue", nil)
} }
func TestIssuanceCombinedMultiSchemeSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("test.test.mijnirma.email")
request := getCombinedIssuanceRequest(id)
sessionHelper(t, request, "issue", nil)
sessionHelper(t, irma.NewIssuanceRequest([]*irma.CredentialRequest{
{
CredentialTypeID: irma.NewCredentialTypeIdentifier("test.test.email"),
Attributes: map[string]string{
"email": "example@example.com",
},
},
}, irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard.studentID")), "issue", nil)
}
func TestMultipleIssuanceSession(t *testing.T) { func TestMultipleIssuanceSession(t *testing.T) {
request := getMultipleIssuanceRequest() request := getMultipleIssuanceRequest()
sessionHelper(t, request, "issue", nil) sessionHelper(t, request, "issue", nil)
...@@ -425,7 +410,7 @@ func TestStaticQRSession(t *testing.T) { ...@@ -425,7 +410,7 @@ func TestStaticQRSession(t *testing.T) {
// setup static QR and other variables // setup static QR and other variables
qr := &irma.Qr{ qr := &irma.Qr{
Type: irma.ActionRedirect, Type: irma.ActionRedirect,
URL: "http://localhost:48682/session/-/static/staticsession", URL: "http://localhost:48682/irma/-/static/staticsession",
} }
bts, err := json.Marshal(qr) bts, err := json.Marshal(qr)
require.NoError(t, err) require.NoError(t, err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment