debian-mirror-gitlab/spec/helpers/graph_helper_spec.rb

17 lines
439 B
Ruby
Raw Normal View History

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