2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-09-25 12:07:36 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GraphHelper do
|
|
|
|
describe '#get_refs' do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:project) { create(:project, :repository) }
|
2015-09-25 12:07:36 +05:30
|
|
|
let(:commit) { project.commit("master") }
|
|
|
|
let(:graph) { Network::Graph.new(project, 'master', commit, '') }
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
it 'filters our refs used by GitLab' do
|
2015-09-25 12:07:36 +05:30
|
|
|
self.instance_variable_set(:@graph, graph)
|
2018-03-17 18:26:18 +05:30
|
|
|
refs = refs(project.repository, commit)
|
|
|
|
|
|
|
|
expect(refs).to match('master')
|
2015-09-25 12:07:36 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|