From 4411390a001f7485feb7f5128e0b8bc50fad1026 Mon Sep 17 00:00:00 2001 From: Mauro Lepore Date: Wed, 29 Jan 2020 10:08:48 -0600 Subject: [PATCH] Test pr_find() handles repo with no pr (#990) --- tests/testthat/test-pr.R | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/testthat/test-pr.R diff --git a/tests/testthat/test-pr.R b/tests/testthat/test-pr.R new file mode 100644 index 000000000..b793988fa --- /dev/null +++ b/tests/testthat/test-pr.R @@ -0,0 +1,11 @@ +test_that("pr_find with a repo with no pr and a new pr outputs character()", { + expect_error_free( + pr_find("maurolepore", repo = "with-no-pr", pr_branch = "new") + ) +}) + +test_that("pr_find with a repo with some pr and a new pr outputs character()", { + expect_error_free( + pr_find("maurolepore", repo = "with-some-pr", pr_branch = "new") + ) +})