tests/testthat/test-idig_view_media.R

context("test idig_view_media")

med_uuid <- "e2d288dc-319e-4a13-b759-527021122bbc"

test_that("viewing a media record returns right information", {
  testthat::skip_on_cran()
  testthat::skip_if_offline()
  
  med <- idig_view_media(med_uuid)

  expect_that(med, is_a("list"))
  expect_that(med$uuid, equals(med_uuid))
  expect_that(med$data, is_a("list"))
  expect_true(length(med$data$coreid) > 0)
  expect_that(med$indexTerms, is_a("list"))
  expect_that(med$indexTerms$uuid, equals(med_uuid))
  expect_that(med$attribution, is_a("list"))
  expect_true(length(med$attribution$description) > 0)
})

Try the ridigbio package in your browser

Any scripts or data that you put into this service are public.

ridigbio documentation built on Oct. 1, 2024, 9:06 a.m.