@@ -13,14 +13,14 @@ test("parses authorization token", () => {
1313
1414test ( "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
2121test ( "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
3434test ( "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
4040test ( "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