tests/testthat/test_integration_sourceRepoFile.R

library(githubr)
context("sourceRepoFile integration")

test_that("sourceRepoFile - repo character", {
  checkGithubToken()
  
  sourceRepoFile(repository="brian-bot/githubr", repositoryPath="R/getGithubJSON.R", ref="tag", refName="rGithubClient-0.8")
  expect_true(exists(".getGithubJSON"))
})

test_that("sourceRepoFile - repo object", {
  checkGithubToken()
  
  myRepo <- getRepo("brian-bot/githubr", ref="tag", refName="rGithubClient-0.8")
  sourceRepoFile(repository=myRepo, repositoryPath="R/getGithubJSON.R")
  expect_true(exists(".getGithubJSON"))
})
brian-bot/githubr documentation built on June 21, 2021, 3:55 p.m.