Skip to content

Commit

Permalink
Test for specific error when disabling binding after client connected
Browse files Browse the repository at this point in the history
  • Loading branch information
ivard committed Oct 6, 2020
1 parent 3cdc197 commit 20a3811
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/sessiontest/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ func TestIssuanceBinding(t *testing.T) {
result := &irma.SessionOptions{}
err = handler.frontendTransport.Post("frontend/options", result, request)
require.Error(t, err)
sessionErr = err.(*irma.SessionError)
require.Equal(t, irma.ErrorApi, sessionErr.ErrorType)
require.Equal(t, server.ErrorUnexpectedRequest.Status, sessionErr.RemoteError.Status)
require.Equal(t, string(server.ErrorUnexpectedRequest.Type), sessionErr.RemoteError.ErrorName)

err = handler.frontendTransport.Post("frontend/bindingcompleted", nil, nil)
require.NoError(handler.t, err)
Expand Down

0 comments on commit 20a3811

Please sign in to comment.