Add test for search_tap.
This commit is contained in:
parent
e5274c0d81
commit
50b635e276
19
Library/Homebrew/test/test_search_remote_tap.rb
Normal file
19
Library/Homebrew/test/test_search_remote_tap.rb
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user