Skip to content

Commit d848664

Browse files
committed
Add test case for pre
1 parent d87fb1f commit d848664

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/unit/auth-handlers.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,5 +2692,19 @@ describe('Auth Handler:', function () {
26922692
done();
26932693
});
26942694
});
2695+
it('should not allow sign to be reached if required parameters arent there', function (done) {
2696+
var rawRequest = _.cloneDeep(rawRequests.ociWithBody);
2697+
2698+
rawRequest.auth.oci.privatekey = undefined;
2699+
var request = new Request(rawRequest),
2700+
auth = request.auth,
2701+
authInterface = createAuthInterface(auth),
2702+
handler = AuthLoader.getHandler(auth.type);
2703+
2704+
handler.pre(authInterface, function (a, b) {
2705+
expect(b).to.be.eql(false);
2706+
done();
2707+
});
2708+
});
26952709
});
26962710
});

0 commit comments

Comments
 (0)