-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
603b8e4
commit ac13c05
Showing
7 changed files
with
74 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
httptest::with_mock_api({ | ||
test_that("output from market summary is as expected", { | ||
testthat::skip_on_cran() | ||
trend <- get_market_summary() | ||
expect_equal(length(trend[[1]]), 29) | ||
expect_equal(trend[[1]]$fullExchangeName, "CME") | ||
expect_equal(trend[[1]]$symbol, "ES=F") | ||
expect_equal(trend[[1]]$quoteType, "FUTURE") | ||
expect_equal(trend[[1]]$regularMarketPrice$raw, 4159.25) | ||
if (requireNamespace("httptest", quietyly = TRUE)) { | ||
httptest::with_mock_api({ | ||
test_that("output from market summary is as expected", { | ||
testthat::skip_on_cran() | ||
trend <- get_market_summary() | ||
expect_equal(length(trend[[1]]), 29) | ||
expect_equal(trend[[1]]$fullExchangeName, "CME") | ||
expect_equal(trend[[1]]$symbol, "ES=F") | ||
expect_equal(trend[[1]]$quoteType, "FUTURE") | ||
expect_equal(trend[[1]]$regularMarketPrice$raw, 4159.25) | ||
}) | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
test_that("output from validate is as expected", { | ||
testthat::skip_on_cran() | ||
expect_true(validate("aapl")) | ||
}) | ||
|
||
test_that("output from validate is as expected when symbol is wrong", { | ||
testthat::skip_on_cran() | ||
expect_false(validate("aapls")) | ||
}) |