Add test for search_tap.

This commit is contained in:
Markus Reiter 2016-09-25 16:00:34 +02:00
parent e5274c0d81
commit 50b635e276

View File

@ -0,0 +1,19 @@
require "testing_env"
require "cmd/search"
class SearchRemoteTapTests < Homebrew::TestCase
def test_search_remote_tap
json_response = {
"tree" => [
{
"path" => "Formula/not-a-formula.rb",
"type" => "blob",
},
],
}
GitHub.stubs(:open).yields(json_response)
assert_equal ["homebrew/not-a-tap/not-a-formula"], Homebrew.search_tap("homebrew", "not-a-tap", "not-a-formula")
end
end