# WARNING - Generated by {fusen} from dev/flat_convert_r.Rmd: do not edit by hand

test_that("Valid output are consistent", {
  
  mydir <- file.path(tempdir(), "convert_r_tests_examples")
  dir.create(mydir)
  
  mask_convert_r(output_path = mydir)
  
  expect_identical(
    object = list.files(mydir), 
    expected = "mask_convert_r.xlsx")
  
  expect_equal(
    object = names(readxl::read_xlsx(file.path(mydir, "mask_convert_r.xlsx")))[1:4],
    expected = c("folder_path", "file", "converted_file", "to_convert"))
  
  unlink(mydir, recursive = TRUE)
})

test_that("Errors are consistent", {
  
  expect_error(
    mask_convert_r("~/noexist"), 
    "output_path doesn't exist")
})
