Skip to content

Commit f198623

Browse files
Update authorization_code test
1 parent 69cdd2c commit f198623

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/handlers/authorize-handler_test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,9 @@ describe('AuthorizeHandler integration', function() {
563563
getClient: function() {
564564
return client;
565565
},
566-
saveAuthorizationCode: function() {
567-
return { authorizationCode: 12345, client: client };
566+
generateAuthorizationCode: async () => 'some-code',
567+
saveAuthorizationCode: async function(code) {
568+
return { authorizationCode: code.authorizationCode, client: client };
568569
}
569570
};
570571
const handler = new AuthorizeHandler({ authorizationCodeLifetime: 120, model: model });
@@ -586,7 +587,7 @@ describe('AuthorizeHandler integration', function() {
586587
return handler.handle(request, response)
587588
.then(function(data) {
588589
data.should.eql({
589-
authorizationCode: 12345,
590+
authorizationCode: 'some-code',
590591
client: client
591592
});
592593
})

0 commit comments

Comments
 (0)