File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,20 +30,20 @@ test("properly escapes image names", () => {
3030 ) ;
3131} ) ;
3232
33- function dummyApi ( url ) {
33+ function dummyApi ( statusCode ) {
3434 const api = new AutoDeployApi ( "dummy" , "dummy" ) ;
35- api . redeployUrl = ( ) => url ;
35+ api . client . postJson = ( ) => ( { statusCode } ) ;
3636 return api ;
3737}
3838
3939test ( "returns successfully on 2xx status codes" , async ( ) => {
40- const api = dummyApi ( "https://httpbin.org/post" ) ;
40+ const api = dummyApi ( 200 ) ;
4141 const status = await api . redeploy ( "foo" , "bar" ) ;
4242 assert . strictEqual ( status , 200 ) ;
4343} ) ;
4444
4545test ( "throws on error codes" , async ( ) => {
46- const api = dummyApi ( "https://httpbin.org/status/ 404" ) ;
46+ const api = dummyApi ( 404 ) ;
4747 await assert . rejects ( ( ) => api . redeploy ( "foo" , "bar" ) , {
4848 message : "HTTP error 404" ,
4949 } ) ;
You can’t perform that action at this time.
0 commit comments