Skip to content

Commit

Permalink
Add more tests into the io module spec
Browse files Browse the repository at this point in the history
  • Loading branch information
aarranz committed Nov 16, 2016
1 parent 550c6b2 commit 5d6021e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/js_tests/wirecloud/ioSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,26 @@
.toBe(original.toString());
});

it("should ignore the supportAccessControl option if using the forceProxy option", function () {
var original = "http://server:1234/path?q=1";
var expected = "https://wirecloud.example.com/cdp/http/server:1234/path?q=1";

expect(Wirecloud.io.buildProxyURL(original, {
supportsAccessControl: true,
forceProxy: true
})).toBe(expected);
});

it("should ignore the supportAccessControl option if using the forceProxy option (using URL instances)", function () {
var original = new URL("http://server:1234/path?q=1");
var expected = "https://wirecloud.example.com/cdp/http/server:1234/path?q=1";

expect(Wirecloud.io.buildProxyURL(original, {
supportsAccessControl: true,
forceProxy: true
})).toBe(expected);
});

it("should support the parameters option (using URL instances)", function () {
var original = new URL("http://server:1234/path");
var expected = "https://wirecloud.example.com/cdp/http/server:1234/path?e=1&b=c";
Expand Down

0 comments on commit 5d6021e

Please sign in to comment.