tests/testthat/test-ContentService.R

context("ContentService")

skip("Reduce Total Test Runtime")

rdfp_options <- readRDS("rdfp_options.rds")
options(rdfp.network_code = rdfp_options$network_code)
options(rdfp.httr_oauth_cache = FALSE)
options(rdfp.application_name = rdfp_options$application_name)
options(rdfp.client_id = rdfp_options$client_id)
options(rdfp.client_secret = rdfp_options$client_secret)

dfp_auth(token = "rdfp_token.rds")

test_that("dfp_getContentByStatement", {

   request_data <- list('statement'=list('query'="WHERE status='ACTIVE'"))
   
   expect_message(try(dfp_getContentByStatement(request_data), silent=T), 'MISSING_FEATURE')
   expect_error(dfp_getContentByStatement(request_data))

})

test_that("dfp_getContentByStatementAndCustomTargetingValue", {

#  dfp_getContentByStatementAndCustomTargetingValue_result <- dfp_getContentByStatementAndCustomTargetingValue()

#  expect_is(dfp_getContentByStatementAndCustomTargetingValue_result, "list")
  expect_true(TRUE)

})
ReportMort/rdfp documentation built on June 9, 2019, 9:21 p.m.