Skip to content

Commit

Permalink
Added unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto committed Dec 13, 2016
1 parent 093e9ff commit b651b44
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/client/utils/__tests__/ConfigUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,14 @@ describe('ConfigUtils', () => {
expect(layer.url[0]).toBe(ConfigUtils.getConfigProp('proxyUrl'));
expect(layer.url[1]).toBe(ConfigUtils.getConfigProp('proxyUrl'));
});

it('proxied url', () => {
expect(ConfigUtils.getProxiedUrl('http://remote.url')).toBe(ConfigUtils.getConfigProp('proxyUrl') + encodeURIComponent('http://remote.url'));
expect(ConfigUtils.getProxiedUrl('http://remote.cors', {
proxyUrl: {
url: 'myproxy',
useCORS: ['http://remote.cors']
}
})).toBe('http://remote.cors');
});
});

0 comments on commit b651b44

Please sign in to comment.