From 6940dafca85f09dc3b79290ae9e8493b67965277 Mon Sep 17 00:00:00 2001 From: Reuben Wong Date: Fri, 20 Oct 2023 00:04:49 +0800 Subject: [PATCH] change earlier date for integration tests Plan only goes back for a 1 year history. --- tests/eod_date.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/eod_date.rs b/tests/eod_date.rs index c54c43e..399f72c 100644 --- a/tests/eod_date.rs +++ b/tests/eod_date.rs @@ -1,5 +1,3 @@ -//! [WARNING] Code is this module is untested due to API plan restrictions. - use chrono::NaiveDate; use marketstack::api::common::SortOrder; use marketstack::api::eod::EodDate; @@ -15,7 +13,7 @@ fn test_eod_date() { let client = Marketstack::new_insecure("api.marketstack.com", api_key).unwrap(); let endpoint = EodDate::builder() - .date(NaiveDate::from_ymd_opt(2022, 4, 23).unwrap()) + .date(NaiveDate::from_ymd_opt(2023, 9, 29).unwrap()) .symbol("AAPL") .build() .unwrap(); @@ -34,7 +32,7 @@ fn test_eod_date_paged() { let client = Marketstack::new_insecure("api.marketstack.com", api_key).unwrap(); let endpoint = EodDate::builder() - .date(NaiveDate::from_ymd_opt(2022, 4, 23).unwrap()) + .date(NaiveDate::from_ymd_opt(2023, 9, 29).unwrap()) .symbol("AAPL") .limit(5) .unwrap() @@ -54,7 +52,7 @@ fn test_eod_date_sorting() { let endpoint = EodDate::builder() .symbol("AAPL") - .date(NaiveDate::from_ymd_opt(2022, 4, 23).unwrap()) + .date(NaiveDate::from_ymd_opt(2023, 9, 29).unwrap()) .sort(SortOrder::Ascending) .build() .unwrap(); @@ -71,7 +69,7 @@ async fn test_async_eod_date() { .unwrap(); let endpoint = EodDate::builder() - .date(NaiveDate::from_ymd_opt(2022, 4, 23).unwrap()) + .date(NaiveDate::from_ymd_opt(2023, 9, 29).unwrap()) .symbol("AAPL") .build() .unwrap(); @@ -93,7 +91,7 @@ async fn test_async_eod_date_paged() { let endpoint = EodDate::builder() .symbol("AAPL") - .date(NaiveDate::from_ymd_opt(2022, 4, 23).unwrap()) + .date(NaiveDate::from_ymd_opt(2023, 9, 29).unwrap()) .limit(5) .unwrap() .build()