From 35674a80c707ea6b84075ca5365895b21502b6b8 Mon Sep 17 00:00:00 2001 From: daladim Date: Fri, 19 Mar 2021 00:01:32 +0100 Subject: [PATCH] [tests] --- tests/caldav_client.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/caldav_client.rs b/tests/caldav_client.rs index afa7d63..676380d 100644 --- a/tests/caldav_client.rs +++ b/tests/caldav_client.rs @@ -8,6 +8,7 @@ use url::Url; use my_tasks::client::Client; use my_tasks::traits::PartialCalendar; +use my_tasks::traits::CalDavSource; use my_tasks::settings::URL; use my_tasks::settings::USERNAME; @@ -39,19 +40,17 @@ static EXAMPLE_TASKS_BODY_LAST_MODIFIED: &str = r#" async fn test_client() { let _ = env_logger::builder().is_test(true).try_init(); - let mut client = Client::new(URL, USERNAME, PASSWORD).unwrap(); + let client = Client::new(URL, USERNAME, PASSWORD).unwrap(); let calendars = client.get_calendars().await.unwrap(); let mut last_cal = None; println!("Calendars:"); let _ = calendars.iter() .map(|(id, cal)| { - println!(" {}\t{}", cal.name(), id.as_str()); + println!(" {}\t{}", cal.lock().unwrap().name(), id.as_str()); last_cal = Some(id); }) .collect::<()>(); - - let _ = client.get_tasks(&last_cal.unwrap()).await; } #[tokio::test]