From 2615888a2cb5c810a81fd41066867259cf75241c Mon Sep 17 00:00:00 2001 From: Karthik Bhaskara Date: Fri, 6 Jul 2018 09:11:26 -0700 Subject: [PATCH] Added unit test for iOS and Android redirect uris --- test/lib/validators.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/lib/validators.js b/test/lib/validators.js index 8a15dc8f..dc80f3b3 100644 --- a/test/lib/validators.js +++ b/test/lib/validators.js @@ -68,3 +68,15 @@ test('invalid development parameter', function(t) { t.throws(() => validators.validateRequestData(requestData), errors.ValidationError); }); + +test('iOS and Android redirect uri', function(t) { + const requestData = { + clientId: CLIENT_ID, + clientSecret: CLIENT_SECRET, + redirectUri: 'sc4a1b01e5-0497-417c-a30e-6df6ba33ba46://callback', + scope: ['read_odometer', 'read_vehicle_info'], + }; + + t.notThrows(() => + validators.validateRequestData(requestData), errors.ValidationError); +});