From 4eeb9895bc85e172b4ff1e62e19e6abd51a095a6 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Mon, 10 Apr 2023 14:18:48 +0200 Subject: [PATCH] create test to... test --- src/limit.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/limit.rs b/src/limit.rs index d84397f..e1aee70 100644 --- a/src/limit.rs +++ b/src/limit.rs @@ -46,6 +46,8 @@ impl LimitedRequester { e ) }); + println!("{}", result); + /* 2. extract rate and absolute rate limits from response result 3. put each different rate limit as a new object in the limit vector @@ -62,12 +64,14 @@ impl LimitedRequester { } } -/* #[cfg(test)] Tests work here as well, neat! +#[cfg(test)] mod tests { use super::*; - #[test] - fn test_parse_url() { - assert_eq!(1, 1) + #[tokio::test] + async fn test_parse_url() { + let test_vec = LimitedRequester::check_limits(String::from("http://localhost:3001/")).await; + let first_from_vec = test_vec.get(0).unwrap(); + println!("{}", first_from_vec.bucket); } -} */ +}