debian-mirror-gitlab/spec/helpers/graph_helper_spec.rb
2020-08-09 17:44:08 +05:30

18 lines
476 B
Ruby

# 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