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;
77use chrono:: Utc ;
88use diesel:: { ExpressionMethods , RunQueryDsl } ;
99use googletest:: prelude:: * ;
10+ use http:: StatusCode ;
1011use insta:: assert_json_snapshot;
1112use std:: time:: Duration ;
1213
@@ -275,15 +276,14 @@ async fn patch_version_yank_unyank() {
275276 assert_json_helper ( json) ;
276277
277278 // Attempt to set yank message on unyanked version (should fail)
278- token
279+ let response = token
279280 . 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+
283284 // Attempt to unyank with message (should fail)
284- token
285+ let response = token
285286 . 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 ) ;
289289}
You can’t perform that action at this time.
0 commit comments