# test-endpoints.R
testthat::test_that("Test conditions", {
#quote_length <- httr::GET(paste0(base_url(), '/api/quotes?pageSize=100'),
# sell_auth()
#)
#quote_length <- httr::GET(paste0(base_url(), '/api/quotes?pageSize=1000'),
# sell_auth()
# )
quote_field <- httr::GET(paste0(base_url(), '/api/quotes?fields=name,id'),
sell_auth())
quote_cols <- httr::GET(paste0(base_url(), '/api/quotes?columns=name,id'),
sell_auth())
#process_sell(quote_length)
#process_sell(quote_cols)
testthat::expect_length(1, 1)
})
testthat::test_that('Make conditions', {
z <- list(includeFields = 'name,id,accountName',
conditions = NULL,
pageSize = 100L,
page = 3L
)
resp <- httr::GET(paste0(base_url(), '/api/quotes'), sell_auth(), query = z, httr::verbose())
process_sell(resp)
testthat::expect_length(1, 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.