tests/testthat/test-get_avatar_picture.R

# Unit tests for the get_avatar_picture function

# Test 1: Error thrown if invalid type is specified
test_that("Returns error if invalid type specified", {
  expect_error(get_avatar_picture("c751b27d9158c1dd41bd33dc7e4bcdde", type = "invalid", keep_image = FALSE), "Invalid value entered for type: can only be 'full' or 'thumbnail'")
})
njbultman/sleepr documentation built on Nov. 20, 2024, 1:35 a.m.