Skip to content

Commit c738e04

Browse files
committed
Fix tests, allowing a configurable strategy
1 parent 80fd238 commit c738e04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ test("parses authorization token", () => {
1313

1414
test("computes correct redeploy URL", () => {
1515
const api = new AutoDeployApi("https://foo.bar/", "u:p");
16-
expect(api.redeployUrl("services", "foo, bar baz")).toBe(
16+
expect(api.redeployUrl("services", "rollout", "foo, bar baz")).toBe(
1717
"https://foo.bar/services/foo,bar%20baz/rollout",
1818
);
1919
});
2020

2121
test("properly escapes image names", () => {
2222
const api = new AutoDeployApi("https://foo.bar/", "u:p");
23-
expect(api.redeployUrl("image", "foo/bar/baz:baw")).toBe(
23+
expect(api.redeployUrl("image", "rollout", "foo/bar/baz:baw")).toBe(
2424
"https://foo.bar/image/foo%2Fbar%2Fbaz%3Abaw/rollout",
2525
);
2626
});
@@ -33,13 +33,13 @@ function dummyApi(url) {
3333

3434
test("returns successfully on 2xx status codes", async () => {
3535
const api = dummyApi("https://httpbin.org/post");
36-
const status = await api.redeploy("foo", "bar");
36+
const status = await api.redeploy("foo", "rollout", "bar");
3737
expect(status).toBe(200);
3838
});
3939

4040
test("throws on error codes", async () => {
4141
const api = dummyApi("https://httpbin.org/status/404");
42-
await expect(api.redeploy("foo", "bar")).rejects.toThrow(
42+
await expect(api.redeploy("foo", "rollout", "bar")).rejects.toThrow(
4343
"HTTP error 404",
4444
);
4545
});

0 commit comments

Comments
 (0)