blob: 9a8610bd8c016a7fa1e29ece2519d33ba3d180dc [file] [log] [blame]
Marc Kupietz6ddece42023-12-18 17:02:36 +01001test_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
8test_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 Kupietz06e5b972024-12-07 17:22:06 +010013
14test_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})