mirror of
https://github.com/NexVeridian/ark-invest-api-rust-data.git
synced 2025-09-02 09:59:12 +00:00
0.4.0
This commit is contained in:
parent
41bd1e8fe7
commit
ffb24e7943
6 changed files with 93 additions and 81 deletions
|
@ -15,18 +15,22 @@ fn get_api_arkk() -> Result<(), Box<dyn Error>> {
|
|||
.get_api(NaiveDate::from_ymd_opt(2023, 5, 18))?
|
||||
.collect()?;
|
||||
|
||||
assert_eq!(
|
||||
df.get_column_names(),
|
||||
[
|
||||
"company",
|
||||
"cusip",
|
||||
"date",
|
||||
"market_value",
|
||||
"share_price",
|
||||
"shares",
|
||||
"ticker",
|
||||
"weight"
|
||||
]
|
||||
let expected = [
|
||||
"company",
|
||||
"cusip",
|
||||
"date",
|
||||
"market_value",
|
||||
"share_price",
|
||||
"shares",
|
||||
"ticker",
|
||||
"weight",
|
||||
"weight_rank",
|
||||
];
|
||||
let actual = df.get_column_names();
|
||||
|
||||
assert!(
|
||||
actual == expected || actual == expected[..expected.len() - 1],
|
||||
"Column names are wrong"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue