Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
projects.thm.de
GitLab
Commits
f39fe34a
Commit
f39fe34a
authored
Jun 29, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for GitalyClient::Ref#find_ref_name
parent
8a62f304
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
lib/gitlab/gitaly_client/ref.rb
lib/gitlab/gitaly_client/ref.rb
+1
-1
spec/lib/gitlab/gitaly_client/ref_spec.rb
spec/lib/gitlab/gitaly_client/ref_spec.rb
+9
-0
No files found.
lib/gitlab/gitaly_client/ref.rb
View file @
f39fe34a
...
...
@@ -34,7 +34,7 @@ def find_ref_name(commit_id, ref_prefix)
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
...
...
spec/lib/gitlab/gitaly_client/ref_spec.rb
View file @
f39fe34a
...
...
@@ -78,4 +78,13 @@
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment