File tree 1 file changed +14
-7
lines changed 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -912,14 +912,21 @@ mod test {
912
912
. archive_storage ( true )
913
913
. rustdoc_file ( "dummy/index.html" )
914
914
. create ( ) ?;
915
- let resp = env. frontend ( ) . get ( "/dummy/latest/dummy/" ) . send ( ) ?;
916
- assert_eq ! ( resp. headers( ) . get( "Cache-Control" ) . unwrap( ) , & "max-age=0" ) ;
917
915
918
- let resp = env. frontend ( ) . get ( "/dummy/0.1.0/dummy/" ) . send ( ) ?;
919
- assert_eq ! (
920
- resp. headers( ) . get( "Cache-Control" ) . unwrap( ) ,
921
- & "stale-while-revalidate=2592000, max-age=600"
922
- ) ;
916
+ let web = env. frontend ( ) ;
917
+
918
+ {
919
+ let resp = web. get ( "/dummy/latest/dummy/" ) . send ( ) ?;
920
+ assert_eq ! ( resp. headers( ) . get( "Cache-Control" ) . unwrap( ) , & "max-age=0" ) ;
921
+ }
922
+
923
+ {
924
+ let resp = web. get ( "/dummy/0.1.0/dummy/" ) . send ( ) ?;
925
+ assert_eq ! (
926
+ resp. headers( ) . get( "Cache-Control" ) . unwrap( ) ,
927
+ & "stale-while-revalidate=2592000, max-age=600"
928
+ ) ;
929
+ }
923
930
Ok ( ( ) )
924
931
} )
925
932
}
You can’t perform that action at this time.
0 commit comments