summaryrefslogtreecommitdiff
path: root/spec/helpers/graph_helper_spec.rb
blob: 3c7e4f970c3e7f5f94902ce4879e464edd1d6fb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GraphHelper do
  describe '#get_refs' do
    let(:project) { create(:project, :repository) }
    let(:commit)  { project.commit("master") }
    let(:graph) { Network::Graph.new(project, 'master', commit, '') }

    it 'filters our refs used by GitLab' do
      self.instance_variable_set(:@graph, graph)
      refs = refs(project.repository, commit)

      expect(refs).to match('master')
    end
  end
end