Skip to content

Commit 4400acd

Browse files
committed
add test-data-user.R
1 parent 4cc13cc commit 4400acd

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: repometrics
22
Title: Metrics for Your Code Repository
3-
Version: 0.1.3.029
3+
Version: 0.1.3.030
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/repometrics",
99
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.1.3.029",
11+
"version": "0.1.3.030",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

tests/testthat/test-data-user.R

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
test_that ("user data martrices", {
2+
3+
user_data <- lapply (1:2, function (i) mock_user_rel_data ())
4+
names (user_data) <- c ("a", "b")
5+
6+
mats <- user_relation_matrices (user_data)
7+
8+
expect_s3_class (mats, "data.frame")
9+
expect_equal (ncol (mats), 8L)
10+
nms <- c (
11+
"login1", "login2", "commit_cmt", "commits", "followers", "following",
12+
"issue_cmts", "issues"
13+
)
14+
expect_equal (names (mats), nms)
15+
expect_true (nrow (mats) > 0L)
16+
})

0 commit comments

Comments
 (0)