File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use chrono::Utc;
88use diesel:: { ExpressionMethods , RunQueryDsl } ;
99use googletest:: prelude:: * ;
1010use http:: StatusCode ;
11- use insta:: assert_json_snapshot;
11+ use insta:: { assert_json_snapshot, assert_snapshot } ;
1212use std:: time:: Duration ;
1313
1414#[ tokio:: test( flavor = "multi_thread" ) ]
@@ -280,10 +280,12 @@ async fn patch_version_yank_unyank() {
280280 . update_yank_status ( "patchable" , "1.0.0" , None , Some ( "Invalid message" ) )
281281 . await ;
282282 assert_eq ! ( response. status( ) , StatusCode :: BAD_REQUEST ) ;
283+ assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"Cannot update yank message for a version that is not yanked"}]}"# ) ;
283284
284285 // Attempt to unyank with message (should fail)
285286 let response = token
286287 . update_yank_status ( "patchable" , "1.0.0" , Some ( false ) , Some ( "Invalid message" ) )
287288 . await ;
288289 assert_eq ! ( response. status( ) , StatusCode :: BAD_REQUEST ) ;
290+ assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"Cannot set yank message when unyanking"}]}"# ) ;
289291}
You can’t perform that action at this time.
0 commit comments