@@ -41,7 +41,7 @@ async fn run_test(payload: impl Into<Bytes>) -> (TestApp, Response<()>) {
41
41
. await
42
42
. unwrap ( ) ;
43
43
44
- ( app, cookie_client. put :: < ( ) > ( URL , payload) . await )
44
+ ( app, cookie_client. post :: < ( ) > ( URL , payload) . await )
45
45
}
46
46
47
47
inner ( payload. into ( ) ) . await
@@ -213,7 +213,7 @@ async fn test_unauthenticated() -> anyhow::Result<()> {
213
213
}
214
214
} ) ) ?;
215
215
216
- let response = client. put :: < ( ) > ( URL , body) . await ;
216
+ let response = client. post :: < ( ) > ( URL , body) . await ;
217
217
assert_snapshot ! ( response. status( ) , @"403 Forbidden" ) ;
218
218
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"this action requires authentication"}]}"# ) ;
219
219
@@ -243,7 +243,7 @@ async fn test_token_auth() -> anyhow::Result<()> {
243
243
}
244
244
} ) ) ?;
245
245
246
- let response = token_client. put :: < ( ) > ( URL , body) . await ;
246
+ let response = token_client. post :: < ( ) > ( URL , body) . await ;
247
247
assert_snapshot ! ( response. status( ) , @"403 Forbidden" ) ;
248
248
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"this action can only be performed on the crates.io website"}]}"# ) ;
249
249
@@ -267,7 +267,7 @@ async fn test_missing_crate() -> anyhow::Result<()> {
267
267
}
268
268
} ) ) ?;
269
269
270
- let response = cookie_client. put :: < ( ) > ( URL , body) . await ;
270
+ let response = cookie_client. post :: < ( ) > ( URL , body) . await ;
271
271
assert_snapshot ! ( response. status( ) , @"404 Not Found" ) ;
272
272
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"crate `foo` does not exist"}]}"# ) ;
273
273
@@ -299,7 +299,7 @@ async fn test_non_owner() -> anyhow::Result<()> {
299
299
}
300
300
} ) ) ?;
301
301
302
- let response = other_client. put :: < ( ) > ( URL , body) . await ;
302
+ let response = other_client. post :: < ( ) > ( URL , body) . await ;
303
303
assert_snapshot ! ( response. status( ) , @"400 Bad Request" ) ;
304
304
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"You are not an owner of this crate"}]}"# ) ;
305
305
@@ -331,7 +331,7 @@ async fn test_unknown_github_user() -> anyhow::Result<()> {
331
331
}
332
332
} ) ) ?;
333
333
334
- let response = cookie_client. put :: < ( ) > ( URL , body) . await ;
334
+ let response = cookie_client. post :: < ( ) > ( URL , body) . await ;
335
335
assert_snapshot ! ( response. status( ) , @"400 Bad Request" ) ;
336
336
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"Unknown GitHub user or organization"}]}"# ) ;
337
337
@@ -363,7 +363,7 @@ async fn test_github_error() -> anyhow::Result<()> {
363
363
}
364
364
} ) ) ?;
365
365
366
- let response = cookie_client. put :: < ( ) > ( URL , body) . await ;
366
+ let response = cookie_client. post :: < ( ) > ( URL , body) . await ;
367
367
assert_snapshot ! ( response. status( ) , @"500 Internal Server Error" ) ;
368
368
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"Internal Server Error"}]}"# ) ;
369
369
@@ -398,7 +398,7 @@ async fn test_unverified_email() -> anyhow::Result<()> {
398
398
}
399
399
} ) ) ?;
400
400
401
- let response = cookie_client. put :: < ( ) > ( URL , body) . await ;
401
+ let response = cookie_client. post :: < ( ) > ( URL , body) . await ;
402
402
assert_snapshot ! ( response. status( ) , @"403 Forbidden" ) ;
403
403
assert_snapshot ! ( response. text( ) , @r#"{"errors":[{"detail":"You must verify your email address to create a Trusted Publishing config"}]}"# ) ;
404
404
0 commit comments