File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use chrono::Utc;
8
8
use diesel:: { ExpressionMethods , RunQueryDsl } ;
9
9
use googletest:: prelude:: * ;
10
10
use http:: StatusCode ;
11
- use insta:: assert_json_snapshot;
11
+ use insta:: { assert_json_snapshot, assert_snapshot } ;
12
12
use std:: time:: Duration ;
13
13
14
14
#[ tokio:: test( flavor = "multi_thread" ) ]
@@ -280,10 +280,12 @@ async fn patch_version_yank_unyank() {
280
280
. update_yank_status ( "patchable" , "1.0.0" , None , Some ( "Invalid message" ) )
281
281
. await ;
282
282
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"}]}"# ) ;
283
284
284
285
// Attempt to unyank with message (should fail)
285
286
let response = token
286
287
. update_yank_status ( "patchable" , "1.0.0" , Some ( false ) , Some ( "Invalid message" ) )
287
288
. await ;
288
289
assert_eq ! ( response. status( ) , StatusCode :: BAD_REQUEST ) ;
290
+ assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"Cannot set yank message when unyanking"}]}"# ) ;
289
291
}
You can’t perform that action at this time.
0 commit comments