Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
achubaty committed Nov 15, 2017
1 parent 83021b8 commit 503c5e4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/testthat/test-1-pkgAvail.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
context("pkgAvail")

test_that("pkgAvail throws warnings and errors for incorrect CRAN repos", {
expect_warning(pkgAvail(repos=""))
expect_warning(pkgAvail(repos = ""))


is.available.packages <- function(x){
all(is.matrix(x), dim(x)[2] == 17, names(x)[1:3] == c("Package", "Version","Priority", "Depends"))
is.available.packages <- function(x) {
all(is.matrix(x), dim(x)[2] == 17, names(x)[1:3] == c("Package", "Version", "Priority", "Depends"))
}

skip_if_offline(MRAN())

expect_true(is.available.packages(
pkgAvail(repos = unname(MRAN()))
))
expect_true(is.available.packages(
pkgAvail(repos = MRAN())
))
expect_true(is.available.packages(
pkgAvail(repos=c(CRAN="@CRAN@"))
pkgAvail(repos = c(CRAN = "@CRAN@"))
))

})
})

0 comments on commit 503c5e4

Please sign in to comment.