Skip to content

Commit 029794c

Browse files
committed
update testing
1 parent 598f9ad commit 029794c

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

inst/tinytest/ctrdata_ctis.R

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ expect_message(
6464
con = dbc)),
6565
"Imported .* trial")
6666
expect_true(tmpTest$n >= 0L)
67-
expect_true(tmpTest$queryterm == hist[["query-term"]][2L])
67+
expect_true(tmpTest$queryterm == rev(hist[["query-term"]])[1L])
6868

6969
expect_message(
7070
suppressWarnings(
@@ -73,9 +73,9 @@ expect_message(
7373
ctishistory = TRUE,
7474
only.count = FALSE,
7575
con = dbc)),
76-
"updating")
76+
"updat")
7777
expect_true(tmpTest$n >= 0L)
78-
expect_true(tmpTest$queryterm == hist[["query-term"]][2L])
78+
expect_true(tmpTest$queryterm == rev(hist[["query-term"]])[1L])
7979

8080
expect_message(
8181
suppressWarnings(
@@ -86,7 +86,7 @@ expect_message(
8686
con = dbc)),
8787
"Imported .* trial")
8888
expect_true(tmpTest$n >= 0L)
89-
expect_true(tmpTest$queryterm == hist[["query-term"]][2L])
89+
expect_true(tmpTest$queryterm == rev(hist[["query-term"]])[1L])
9090

9191
expect_message(
9292
suppressWarnings(
@@ -95,9 +95,9 @@ expect_message(
9595
ctishistory = FALSE,
9696
only.count = FALSE,
9797
con = dbc)),
98-
"updating")
98+
"updat")
9999
expect_true(tmpTest$n >= 0L)
100-
expect_true(tmpTest$queryterm == hist[["query-term"]][2L])
100+
expect_true(tmpTest$queryterm == rev(hist[["query-term"]])[1L])
101101

102102
# test full load
103103
hist <- hist[nrow(hist), ]
@@ -384,5 +384,16 @@ if (FALSE) {
384384
count(part) %>%
385385
arrange(desc(n)) %>%
386386
print(n = 100L)
387+
# # A tibble: 8 × 2
388+
# part n
389+
# <chr> <int>
390+
# 1 Protocol 168
391+
# 2 SbjctInfaICF 130
392+
# 3 SynpssofthPr 37
393+
# 4 RcrtmntArrng 21
394+
# 5 LyprsnsSmmoR 16
395+
# 6 SmmryofPrdcC 8
396+
# 7 SmmryofRslts 6
397+
# 8 ClnclStdyRpr 4
387398

388399
}

0 commit comments

Comments
 (0)