File tree 1 file changed +20
-0
lines changed
tests/e2e/web/api/v1/contexts/torrent
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -524,6 +524,26 @@ mod for_guests {
524
524
assert ! ( torrent_list_response. data. total > 0 ) ;
525
525
assert ! ( response. is_json_and_ok( ) ) ;
526
526
}
527
+
528
+ #[ tokio:: test]
529
+ async fn it_should_allow_guests_to_get_torrent_details_searching_by_info_hash ( ) {
530
+ let mut env = TestEnv :: new ( ) ;
531
+ env. start ( api:: Version :: V1 ) . await ;
532
+
533
+ if !env. provides_a_tracker ( ) {
534
+ println ! ( "test skipped. It requires a tracker to be running." ) ;
535
+ return ;
536
+ }
537
+
538
+ let client = Client :: unauthenticated ( & env. server_socket_addr ( ) . unwrap ( ) ) ;
539
+
540
+ let uploader = new_logged_in_user ( & env) . await ;
541
+ let ( test_torrent, _uploaded_torrent) = upload_random_torrent_to_index ( & uploader, & env) . await ;
542
+
543
+ let response = client. get_torrent ( & test_torrent. file_info_hash ( ) ) . await ;
544
+
545
+ assert_eq ! ( response. status, 200 ) ;
546
+ }
527
547
}
528
548
}
529
549
You can’t perform that action at this time.
0 commit comments