File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -3004,6 +3004,31 @@ mod test {
30043004 } )
30053005 }
30063006
3007+ #[ tokio:: test( flavor = "multi_thread" ) ]
3008+ #[ test_case( "folder/file.js" ) ]
3009+ #[ test_case( "root.css" ) ]
3010+ async fn test_static_asset_handler ( path : & str ) -> Result < ( ) > {
3011+ let env = TestEnvironment :: new ( ) . await ?;
3012+
3013+ let storage = env. async_storage ( ) ;
3014+ storage
3015+ . store_one (
3016+ format ! ( "{RUSTDOC_STATIC_STORAGE_PREFIX}{path}" ) ,
3017+ b"static content" ,
3018+ )
3019+ . await ?;
3020+
3021+ let web = env. web_app ( ) . await ;
3022+
3023+ web. assert_success_and_conditional_get (
3024+ & format ! ( "/-/rustdoc.static/{path}" ) ,
3025+ "static content" ,
3026+ )
3027+ . await ?;
3028+
3029+ Ok ( ( ) )
3030+ }
3031+
30073032 #[ test_case( "search-1234.js" ) ]
30083033 #[ test_case( "settings-1234.js" ) ]
30093034 fn fallback_to_root_storage_for_some_js_assets ( path : & str ) {
You can’t perform that action at this time.
0 commit comments