From 822e74258de9fdfed82e536685e15f53f697d8af Mon Sep 17 00:00:00 2001 From: csills01 Date: Mon, 18 Nov 2024 09:49:04 +0000 Subject: [PATCH] add test for col_select error --- tests/testthat/test-get_dataset.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testthat/test-get_dataset.R b/tests/testthat/test-get_dataset.R index 34ddbca..3b9b9d1 100644 --- a/tests/testthat/test-get_dataset.R +++ b/tests/testthat/test-get_dataset.R @@ -44,3 +44,9 @@ test_that("get_dataset errors properly", { regexp = "Did you mean .+?gp-practice-populations.+?\\?" ) }) + +test_that("get_dataset filters error properly", { + expect_error(get_dataset("gp-practice-populations", col_select = "Non-existent column"), + regexp = "API error" + ) +})