File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use crate::tests::VersionResponse;
7
7
use chrono:: Utc ;
8
8
use diesel:: { ExpressionMethods , RunQueryDsl } ;
9
9
use googletest:: prelude:: * ;
10
+ use http:: StatusCode ;
10
11
use insta:: assert_json_snapshot;
11
12
use std:: time:: Duration ;
12
13
@@ -275,15 +276,14 @@ async fn patch_version_yank_unyank() {
275
276
assert_json_helper ( json) ;
276
277
277
278
// Attempt to set yank message on unyanked version (should fail)
278
- token
279
+ let response = token
279
280
. update_yank_status ( "patchable" , "1.0.0" , None , Some ( "Invalid message" ) )
280
- . await
281
- . status ( )
282
- . is_client_error ( ) ;
281
+ . await ;
282
+ assert_eq ! ( response . status( ) , StatusCode :: BAD_REQUEST ) ;
283
+
283
284
// Attempt to unyank with message (should fail)
284
- token
285
+ let response = token
285
286
. update_yank_status ( "patchable" , "1.0.0" , Some ( false ) , Some ( "Invalid message" ) )
286
- . await
287
- . status ( )
288
- . is_client_error ( ) ;
287
+ . await ;
288
+ assert_eq ! ( response. status( ) , StatusCode :: BAD_REQUEST ) ;
289
289
}
You can’t perform that action at this time.
0 commit comments