Skip to content

Commit

Permalink
Assertions for new urlPrefix and apiVersion options of platform.creat…
Browse files Browse the repository at this point in the history
…eUrl.
  • Loading branch information
Ivan Kondratyev committed Feb 8, 2018
1 parent e6b2206 commit 7da77f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/platform/Platform-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,17 @@ describe('RingCentral.platform.Platform', function() {
addMethod: 'POST'
})).to.equal('http://whatever/restapi/v1.0/foo?bar&_method=POST&access_token=ACCESS_TOKEN');

expect(platform.createUrl('/foo?bar', {
urlPrefix: '/rastapi',
apiVersion: 'v2'
})).to.equal('/rastapi/v2/foo?bar');

expect(platform.createUrl('/foo?bar', {
addServer: true,
addToken: true,
urlPrefix: '/rastapi',
apiVersion: 'v2'
})).to.equal('http://whatever/rastapi/v2/foo?bar&access_token=ACCESS_TOKEN');
}));

});
Expand Down

0 comments on commit 7da77f0

Please sign in to comment.