aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/utils/github_spec.rb
blob: 9b539262fb03602d68e15e58f8f659d6f3b82a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require "utils/github"

describe GitHub do
  describe "::search_code", :needs_network do
    it "searches code" do
      results = subject.search_code("repo:Homebrew/brew", "path:/", "filename:readme", "language:markdown")

      expect(results.count).to eq(1)
      expect(results.first["name"]).to eq("README.md")
      expect(results.first["path"]).to eq("README.md")
    end
  end
end