@@ -115,14 +115,14 @@ mod auth {
115
115
let ( _, client, _) = prepare ( ) ;
116
116
117
117
let response = client. yank ( CRATE_NAME , CRATE_VERSION ) ;
118
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
118
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
119
119
assert_eq ! (
120
120
response. into_json( ) ,
121
121
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
122
122
) ;
123
123
124
124
let response = client. unyank ( CRATE_NAME , CRATE_VERSION ) ;
125
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
125
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
126
126
assert_eq ! (
127
127
response. into_json( ) ,
128
128
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
@@ -182,14 +182,14 @@ mod auth {
182
182
client. db_new_scoped_token ( "test-token" , None , None , Some ( expired_at. naive_utc ( ) ) ) ;
183
183
184
184
let response = client. yank ( CRATE_NAME , CRATE_VERSION ) ;
185
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
185
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
186
186
assert_eq ! (
187
187
response. into_json( ) ,
188
188
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
189
189
) ;
190
190
191
191
let response = client. unyank ( CRATE_NAME , CRATE_VERSION ) ;
192
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
192
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
193
193
assert_eq ! (
194
194
response. into_json( ) ,
195
195
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
@@ -222,14 +222,14 @@ mod auth {
222
222
) ;
223
223
224
224
let response = client. yank ( CRATE_NAME , CRATE_VERSION ) ;
225
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
225
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
226
226
assert_eq ! (
227
227
response. into_json( ) ,
228
228
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
229
229
) ;
230
230
231
231
let response = client. unyank ( CRATE_NAME , CRATE_VERSION ) ;
232
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
232
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
233
233
assert_eq ! (
234
234
response. into_json( ) ,
235
235
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
@@ -286,14 +286,14 @@ mod auth {
286
286
) ;
287
287
288
288
let response = client. yank ( CRATE_NAME , CRATE_VERSION ) ;
289
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
289
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
290
290
assert_eq ! (
291
291
response. into_json( ) ,
292
292
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
293
293
) ;
294
294
295
295
let response = client. unyank ( CRATE_NAME , CRATE_VERSION ) ;
296
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
296
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
297
297
assert_eq ! (
298
298
response. into_json( ) ,
299
299
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
@@ -311,14 +311,14 @@ mod auth {
311
311
) ;
312
312
313
313
let response = client. yank ( CRATE_NAME , CRATE_VERSION ) ;
314
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
314
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
315
315
assert_eq ! (
316
316
response. into_json( ) ,
317
317
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
318
318
) ;
319
319
320
320
let response = client. unyank ( CRATE_NAME , CRATE_VERSION ) ;
321
- assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
321
+ assert_eq ! ( response. status( ) , StatusCode :: FORBIDDEN ) ;
322
322
assert_eq ! (
323
323
response. into_json( ) ,
324
324
json!( { "errors" : [ { "detail" : "must be logged in to perform that action" } ] } )
0 commit comments