Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 1 | test_that("textMetadata works", { |
| 2 | skip_if_offline() |
| 3 | m <- new("KorAPConnection") %>% textMetadata(c("WUD17/B96/57558", "WUD17/A97/08541")) |
| 4 | expect("textType" %in% names(m), "textMetadata value should contain a textType column") |
| 5 | }) |
| 6 | |
| 7 | |
| 8 | test_that("textMetadata works for unknown text sigles", { |
| 9 | skip_if_offline() |
| 10 | m <- new("KorAPConnection") %>% textMetadata(c("WUD17/B96/57558", "unknownsigle")) |
| 11 | expect("errors" %in% names(m), "textMetadata should return an errors column if a text does not exist") |
| 12 | }) |
Marc Kupietz | 06e5b97 | 2024-12-07 17:22:06 +0100 | [diff] [blame^] | 13 | |
| 14 | test_that("textMetadata works with list valued fields", { |
| 15 | skip_if_offline() |
| 16 | m <- new("KorAPConnection") %>% textMetadata("WUD17/B96/57558") |
| 17 | expect("staat-gesellschaft\\tbiographien-interviews" == m$textClass[1], "multiple text classes / domnains should be tab separated") |
| 18 | }) |