Skip to content

Commit 6a9ead1

Browse files
committed
Updated unit tests to include test for array of valid audiences
1 parent 9a4c0f0 commit 6a9ead1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test.oauth2.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,16 @@ describe('OAuth2 client', function() {
222222
},
223223
/Wrong recipient/
224224
);
225+
assert.throws(
226+
function() {
227+
oauth2client.verifySignedJwtWithCerts(
228+
data,
229+
{keyid: publicKey},
230+
['testaudience','extra-audience']
231+
);
232+
},
233+
/No valid recipients in array/
234+
);
225235

226236
done();
227237
});

0 commit comments

Comments
 (0)