Commit f39fe34a authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add test for GitalyClient::Ref#find_ref_name

parent 8a62f304
......@@ -34,7 +34,7 @@ module Gitlab
commit_id: commit_id,
prefix: ref_prefix
)
GitalyClient.call(@storage, :ref, :find_ref_name, request).name
encode!(GitalyClient.call(@storage, :ref, :find_ref_name, request).name.dup)
end
def count_tag_names
......
......@@ -78,4 +78,13 @@ describe Gitlab::GitalyClient::Ref do
expect { client.local_branches(sort_by: 'invalid_sort') }.to raise_error(ArgumentError)
end
end
describe '#find_ref_name', seed_helper: true do
let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH) }
let(:client) { described_class.new(repository) }
subject { client.find_ref_name(SeedRepo::Commit::ID, 'refs/heads/master') }
it { should be_utf8 }
it { should eq('refs/heads/master') }
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment