Add textMetadata function to retrieve metadata via sigle(s)
Change-Id: I34714bce07635732d0534f83a48865d6d64903da
diff --git a/tests/testthat/test-textMetadata.R b/tests/testthat/test-textMetadata.R
new file mode 100644
index 0000000..b81ec00
--- /dev/null
+++ b/tests/testthat/test-textMetadata.R
@@ -0,0 +1,12 @@
+test_that("textMetadata works", {
+ skip_if_offline()
+ m <- new("KorAPConnection") %>% textMetadata(c("WUD17/B96/57558", "WUD17/A97/08541"))
+ expect("textType" %in% names(m), "textMetadata value should contain a textType column")
+})
+
+
+test_that("textMetadata works for unknown text sigles", {
+ skip_if_offline()
+ m <- new("KorAPConnection") %>% textMetadata(c("WUD17/B96/57558", "unknownsigle"))
+ expect("errors" %in% names(m), "textMetadata should return an errors column if a text does not exist")
+})