tests/testthat/test-roxytest-tests-source.R

# Generated by roxytest: Do not edit by hand!

# File R/source.R: @tests

test_that("Function add_sour_repo_citation() @ L103", {
  expect_snapshot_value(
                   gedcom(subm("Me")) |> 
                   add_repo(name = "The library") |> 
                   add_sour() |> 
                   add_sour_repo_citation("@R1@") |>
                   remove_dates_for_tests(), "json2")
})


test_that("Function remove_sour_repo_citation() @ L138", {
  expect_equal(gedcom(subm("Me")) |> 
                   add_repo(name = "The library") |> 
                   add_sour() |>
                   remove_dates_for_tests(),
               gedcom(subm("Me")) |> 
                   add_repo(name = "The library") |> 
                   add_sour() |> 
                   add_sour_repo_citation("@R1@") |>
                   remove_sour_repo_citation("@R1@") |> 
                   remove_dates_for_tests())
})


test_that("Function remove_sour() @ L159", {
  expect_equal(gedcom(subm()),
               gedcom(subm()) |> add_sour(title = "text") |> remove_sour())
})
jl5000/tidygedcom documentation built on June 22, 2022, 5:16 p.m.