Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
4730326a
Commit
4730326a
authored
Feb 11, 2018
by
Sietse Ringers
Browse files
Small fixes to unit tests
parent
12c70eaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
irmaclient/session_test.go
View file @
4730326a
...
@@ -59,8 +59,9 @@ func (th TestHandler) RequestVerificationPermission(request irma.DisclosureReque
...
@@ -59,8 +59,9 @@ func (th TestHandler) RequestVerificationPermission(request irma.DisclosureReque
var
candidates
[]
*
irma
.
AttributeIdentifier
var
candidates
[]
*
irma
.
AttributeIdentifier
for
_
,
disjunction
:=
range
request
.
Content
{
for
_
,
disjunction
:=
range
request
.
Content
{
candidates
=
th
.
client
.
Candidates
(
disjunction
)
candidates
=
th
.
client
.
Candidates
(
disjunction
)
require
.
NotNil
(
th
.
t
,
candidates
)
if
len
(
candidates
)
==
0
{
require
.
NotEmpty
(
th
.
t
,
candidates
,
1
)
th
.
Failure
(
irma
.
ActionUnknown
,
&
irma
.
SessionError
{
Err
:
errors
.
New
(
"No disclosure candidates found"
)})
}
choice
.
Attributes
=
append
(
choice
.
Attributes
,
candidates
[
0
])
choice
.
Attributes
=
append
(
choice
.
Attributes
,
candidates
[
0
])
}
}
callback
(
true
,
choice
)
callback
(
true
,
choice
)
...
...
irmago_test.go
View file @
4730326a
...
@@ -231,11 +231,8 @@ func TestServiceProvider(t *testing.T) {
...
@@ -231,11 +231,8 @@ func TestServiceProvider(t *testing.T) {
}`
}`
require
.
NoError
(
t
,
json
.
Unmarshal
([]
byte
(
spjson
),
&
spjwt
))
require
.
NoError
(
t
,
json
.
Unmarshal
([]
byte
(
spjson
),
&
spjwt
))
require
.
NotNil
(
t
,
spjwt
.
Request
.
Request
.
Content
)
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
)
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
)
require
.
NotNil
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
])
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
])
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
])
require
.
NotNil
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
]
.
Attributes
)
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
]
.
Attributes
)
require
.
NotEmpty
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
]
.
Attributes
)
require
.
Equal
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
]
.
Attributes
[
0
]
.
Name
(),
"studentID"
)
require
.
Equal
(
t
,
spjwt
.
Request
.
Request
.
Content
[
0
]
.
Attributes
[
0
]
.
Name
(),
"studentID"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment