fn should_deny_url_blocks_child_when_scan_url_isnt_parent() {
        let scan_url = "https://testdomain.com/api";
        let deny_url = "https://testdomain.com/";
        let tested_url = Url::parse("https://testdomain.com/stuff/").unwrap();

        let scans = Arc::new(FeroxScans::default());
        scans.add_directory_scan(scan_url, ScanOrder::Initial);

        let mut config = Configuration::new().unwrap();
        config.url_denylist = vec![Url::parse(deny_url).unwrap()];
        let config = Arc::new(config);

        let handles = Arc::new(Handles::for_testing(Some(scans), Some(config)).0);

        assert!(should_deny_url(&tested_url, handles).unwrap());
    }
/// provide a denier where the tested url is a sub-path and the scanned url is not, expect true
provide a denier where the tested url is a sub-path and the scanned url is not, expect true
provide a denier where the tested url is a sub - path and the scanned url is not expect true
fn should_deny_url_blocks_child_when_scan_url_isnt_parent() {
        let scan_url = "https://testdomain.com/api";
        let deny_url = "https://testdomain.com/";
        let tested_url = Url::parse("https://testdomain.com/stuff/").unwrap();
        let scans = Arc::new(FeroxScans::default());
        scans.add_directory_scan(scan_url, ScanOrder::Initial);
        let mut config = Configuration::new().unwrap();
        config.url_denylist = vec![Url::parse(deny_url).unwrap()];
        let config = Arc::new(config);
        let handles = Arc::new(Handles::for_testing(Some(scans), Some(config)).0);
        assert!(should_deny_url(&tested_url, handles).unwrap());
    }
fn should_deny_url_blocks_child_when_scan_url_isnt_parent ( ) { let scan_url = " " ; let deny_url = " " ; let tested_url = Url :: parse ( " " ) . unwrap ( ) ; let scans = Arc :: new ( FeroxScans :: default ( ) ) ; scans . add_directory_scan ( scan_url , ScanOrder :: Initial ) ; let mut config = Configuration :: new ( ) . unwrap ( ) ; config . url_denylist = vec ! [ Url parse ( deny_url ) unwrap ( ) ] ; let config = Arc :: new ( config ) ; let handles = Arc :: new ( Handles :: for_testing ( Some ( scans ) , Some ( config ) ) . 0 ) ; assert ! ( should_deny_url ( tested_url handles ) unwrap ( ) ) ; }
provide a denier where the tested url is a sub-path and the scanned url is not, expect true
provide a denier where the tested url is a sub - path and the scanned url is not expect true