@@ -388,7 +388,7 @@ mod tests {
388
388
#[ test]
389
389
fn serve_rustdoc_content_not_found ( ) {
390
390
wrapper ( |env| {
391
- let response = env. frontend ( ) . get ( "/-/rustdoc- static/style.css" ) . send ( ) ?;
391
+ let response = env. frontend ( ) . get ( "/-/rustdoc. static/style.css" ) . send ( ) ?;
392
392
assert_eq ! ( response. status( ) , StatusCode :: NOT_FOUND ) ;
393
393
assert_cache_control ( & response, CachePolicy :: NoCaching , & env. config ( ) ) ;
394
394
Ok ( ( ) )
@@ -399,21 +399,22 @@ mod tests {
399
399
fn serve_rustdoc_content ( ) {
400
400
wrapper ( |env| {
401
401
let web = env. frontend ( ) ;
402
- env. storage ( ) . store_one ( "style.css" , * b"content" ) ?;
403
402
env. storage ( )
404
- . store_one ( "will_not/be_found.css" , * b"something" ) ?;
403
+ . store_one ( "/rustdoc-static/style.css" , "content" . as_bytes ( ) ) ?;
404
+ env. storage ( )
405
+ . store_one ( "/will_not/be_found.css" , "something" . as_bytes ( ) ) ?;
405
406
406
- let response = web. get ( "/-/rustdoc-static/style.css" ) . send ( ) ?;
407
+ let response = web. get ( "/-/rustdoc.static/style.css" ) . send ( ) ?;
408
+ assert ! ( response. status( ) . is_success( ) ) ;
407
409
assert_cache_control (
408
410
& response,
409
411
CachePolicy :: ForeverInCdnAndBrowser ,
410
412
& env. config ( ) ,
411
413
) ;
412
- assert ! ( response. status( ) . is_success( ) ) ;
413
414
assert_eq ! ( response. text( ) ?, "content" ) ;
414
415
415
416
assert_eq ! (
416
- web. get( "/-/rustdoc- static/will_not/be_found.css" )
417
+ web. get( "/-/rustdoc. static/will_not/be_found.css" )
417
418
. send( ) ?
418
419
. status( ) ,
419
420
StatusCode :: NOT_FOUND
0 commit comments