File: commit_branches_spec.rb

package info (click to toggle)
ruby-octokit 10.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,092 kB
  • sloc: ruby: 13,339; sh: 99; makefile: 7; javascript: 3
file content (19 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

describe Octokit::Client::CommitBranches do
  before do
    Octokit.reset!
    @client = Octokit::Client.new
  end

  describe '.commit_branches', :vcr do
    it 'returns a list of all branches associated with a commit' do
      branches = @client.commit_branches(
        'sferik/rails_admin',
        '77571f28ef686e5b3fac853e5f29037ff4591a08'
      )
      expect(branches.first.name).to eq('master')
      assert_requested :get, github_url('/repos/sferik/rails_admin/commits/77571f28ef686e5b3fac853e5f29037ff4591a08/branches-where-head')
    end
  end # .commit branches
end