File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -875,6 +875,27 @@ mod tests {
875
875
} )
876
876
}
877
877
878
+ #[ test]
879
+ fn search_coloncolon_path_redirects_to_crate_docs ( ) {
880
+ wrapper ( |env| {
881
+ let web = env. frontend ( ) ;
882
+ env. fake_release ( ) . name ( "some_random_crate" ) . create ( ) ?;
883
+ env. fake_release ( ) . name ( "some_other_crate" ) . create ( ) ?;
884
+
885
+ assert_redirect (
886
+ "/releases/search?query=some_random_crate::somepath" ,
887
+ "/some_random_crate/1.0.0/some_random_crate/?query=somepath" ,
888
+ web,
889
+ ) ?;
890
+ assert_redirect (
891
+ "/releases/search?query=some_random_crate::some::path" ,
892
+ "/some_random_crate/1.0.0/some_random_crate/?query=some::path" ,
893
+ web,
894
+ ) ?;
895
+ Ok ( ( ) )
896
+ } )
897
+ }
898
+
878
899
#[ test]
879
900
fn search_result_passes_cratesio_pagination_links ( ) {
880
901
wrapper ( |env| {
You can’t perform that action at this time.
0 commit comments