Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Commit

Permalink
shields unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGatto committed Jan 2, 2017
1 parent b7c8cef commit 861dcca
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.travis.yml
README.Rmd
docs
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
inst/doc
docs

7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Package: cputools
Title: Various helper functions
Version: 0.1.2
Author: Laurent Gatto <[email protected]>
Version: 0.2.0
Authors@R: person(given = "Laurent",
family = "Gatto",
email = "[email protected]",
role = c("aut","cre"))
Maintainer: Laurent Gatto <[email protected]>
Description: Miscellaneous helper functions aimed at facilitating and
standardising simple repetitive tasks.
Expand Down
1 change: 1 addition & 0 deletions R/pkg.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##' @title Generates Github URLs
##' @return A \code{character} with Github URLs.
##' @seealso \code{BiocStyle::Githubpkg}
##' @examples
##' makeGithubUrl("pRoloc", user = "lgatto")
##' makeGithubUrl(c("pRoloc", "pRolocGUI"), user = "lgatto")
Expand Down
16 changes: 16 additions & 0 deletions tests/testthat/test_shields.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,19 @@ test_that("Bioconductor covr shields", {
url <- mrkToUrl(mrk)
expect_true(validUrl(url))
})

test_that("Travis shield", {
sh <- makeTravisShield("cputools", user = "ComputationalProteomicsUnit")
sh0 <- "[![Build Status](https://travis-ci.org/ComputationalProteomicsUnit/cputools.svg?branch=master)](https://travis-ci.org/ComputationalProteomicsUnit/cputools)"
expect_identical(sh, sh0)
url <- mrkToUrl(sh)
expect_true(validUrl(url))
})

test_that("Codecov shield", {
sh <- makeCodecovShield("cputools", user = "ComputationalProteomicsUnit")
sh0 <- "[![codecov](https://codecov.io/gh/ComputationalProteomicsUnit/cputools/branch/master/graph/badge.svg)](https://codecov.io/gh/ComputationalProteomicsUnit/cputools)"
expect_identical(sh, sh0)
url <- mrkToUrl(sh)
expect_true(validUrl(url))
})

0 comments on commit 861dcca

Please sign in to comment.