Skip to content

Commit 071b136

Browse files
committed
Add additional checks to satisfy covr.
1 parent 04a6052 commit 071b136

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

tests/testthat/test-searcher.R

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,68 @@ test_that("Check link generation", {
6868

6969
})
7070

71+
test_that("Validate selection", {
72+
73+
expect_identical(
74+
search_site("toad", "bb", rlang = FALSE),
75+
"https://bitbucket.com/search?q=toad"
76+
)
77+
78+
expect_identical(
79+
search_site("", rlang = FALSE),
80+
"",
81+
"Verify empty query fall through"
82+
)
83+
84+
})
85+
7186

7287
test_that("Malformed search query validation", {
88+
7389
expect_identical(
7490
search_google(""),
7591
"",
7692
"Empty string check if no error messages"
7793
)
7894

95+
96+
expect_identical(
97+
search_bing(""),
98+
"",
99+
"Empty string check if no error messages"
100+
)
101+
102+
103+
expect_identical(
104+
search_ddg(""),
105+
"",
106+
"Empty string check if no error messages"
107+
)
108+
109+
expect_identical(
110+
search_ixquick(""),
111+
"",
112+
"Empty string check if no error messages"
113+
)
114+
115+
expect_identical(
116+
search_so(""),
117+
"",
118+
"Empty string check if no error messages"
119+
)
120+
121+
expect_identical(
122+
search_gh(""),
123+
"",
124+
"Empty string check if no error messages"
125+
)
126+
127+
expect_identical(
128+
search_bb(""),
129+
"",
130+
"Empty string check if no error messages"
131+
)
132+
79133
expect_identical(
80134
search_google(NULL),
81135
"",

0 commit comments

Comments
 (0)