Skip to content

Commit

Permalink
change earlier date for integration tests
Browse files Browse the repository at this point in the history
Plan only goes back for a 1 year history.
  • Loading branch information
reubenwong97 committed Oct 19, 2023
1 parent 5d6d305 commit 6940daf
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/eod_date.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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();
Expand All @@ -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()
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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()
Expand Down

0 comments on commit 6940daf

Please sign in to comment.