From 560d5bdd7101d4e73f6501b5ac1601b0a434cece Mon Sep 17 00:00:00 2001 From: Masayuki Morita Date: Sun, 8 Jan 2017 18:00:31 +0900 Subject: Validate a token when initializing GitHubPrivateRepositoryDownloadStrategy --- Library/Homebrew/test/download_strategies_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/download_strategies_test.rb b/Library/Homebrew/test/download_strategies_test.rb index 21f7e6906..ff4cbbf7a 100644 --- a/Library/Homebrew/test/download_strategies_test.rb +++ b/Library/Homebrew/test/download_strategies_test.rb @@ -65,6 +65,7 @@ class GitHubPrivateRepositoryDownloadStrategyTests < Homebrew::TestCase def setup resource = ResourceDouble.new("https://github.com/owner/repo/archive/1.1.5.tar.gz") ENV["HOMEBREW_GITHUB_API_TOKEN"] = "token" + GitHub.stubs(:repository).returns {} @strategy = GitHubPrivateRepositoryDownloadStrategy.new("foo", resource) end @@ -88,6 +89,7 @@ class GitHubPrivateRepositoryReleaseDownloadStrategyTests < Homebrew::TestCase def setup resource = ResourceDouble.new("https://github.com/owner/repo/releases/download/tag/foo_v0.1.0_darwin_amd64.tar.gz") ENV["HOMEBREW_GITHUB_API_TOKEN"] = "token" + GitHub.stubs(:repository).returns {} @strategy = GitHubPrivateRepositoryReleaseDownloadStrategy.new("foo", resource) end -- cgit v1.2.3