diff --git a/R/roi.R b/R/roi.R index 96526c95..a7fc50cb 100644 --- a/R/roi.R +++ b/R/roi.R @@ -149,8 +149,8 @@ neuprint_ROI_mesh <- function(roi, dataset = NULL, conn = NULL, ...){ } # hidden -neuprint_check_roi <- function(rois, dataset = NULL, conn = NULL, ...){ - possible.rois = neuprint_ROIs(dataset=dataset,conn=conn, superLevel = NULL, ...) +neuprint_check_roi <- function(rois, superLevel = NULL, dataset = NULL, conn = NULL, ...){ + possible.rois = neuprint_ROIs(dataset=dataset,conn=conn, superLevel = superLevel, ...) if(!all(rois%in%possible.rois)){ stop("Regions of interest provided that are not demarcated in dataset ", dataset, " for server ", neuprint_login(conn)$server, ". Please call neuprint_ROIs(superLevel = NULL) to see the available ROIs.") diff --git a/tests/testthat/test-connectivity.R b/tests/testthat/test-connectivity.R index 5392df3a..46f26698 100644 --- a/tests/testthat/test-connectivity.R +++ b/tests/testthat/test-connectivity.R @@ -7,6 +7,9 @@ test_that("neuprint_connection_table works", { expect_equal(neuprint_connection_table(c(818983130, 1796818119), progress = TRUE), t1) + + expect_is(neuprint_connection_table(c(818983130, 1796818119), prepost = "POST", + by.roi = TRUE, roi = "LH(R)"), 'data.frame') }) test_that("neuprint_connection_table works", {