mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
fix(api): disable unsupported MSN history
This commit is contained in:
parent
9b2e32e0c6
commit
0a7d123f90
5 changed files with 57 additions and 46 deletions
25
tests/cli.rs
25
tests/cli.rs
|
|
@ -106,6 +106,31 @@ fn technical_with_mock_provider_json_contains_fields() {
|
|||
.stdout(predicate::str::contains("\"signals\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn msn_history_reports_unsupported() {
|
||||
test_bin("msn-history-unsupported")
|
||||
.env("IDX_PROVIDER", "msn")
|
||||
.args(["stocks", "history", "BBCA", "--period", "1mo"])
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains(
|
||||
"MSN provider does not currently support history or technical analysis",
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn msn_technical_json_reports_unsupported() {
|
||||
test_bin("msn-technical-unsupported")
|
||||
.env("IDX_PROVIDER", "msn")
|
||||
.args(["-o", "json", "stocks", "technical", "BBCA"])
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains("\"code\": \"UNSUPPORTED\""))
|
||||
.stderr(predicate::str::contains(
|
||||
"MSN provider does not currently support history or technical analysis",
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn growth_with_mock_provider_table_contains_expected_rows() {
|
||||
test_bin("growth-table")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue