Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
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 @@ module Gitlab
...
@@ -34,7 +34,7 @@ module Gitlab
commit_id:
commit_id
,
commit_id:
commit_id
,
prefix:
ref_prefix
prefix:
ref_prefix
)
)
GitalyClient
.
call
(
@storage
,
:ref
,
:find_ref_name
,
request
).
name
encode!
(
GitalyClient
.
call
(
@storage
,
:ref
,
:find_ref_name
,
request
).
name
.
dup
)
end
end
def
count_tag_names
def
count_tag_names
...
...
spec/lib/gitlab/gitaly_client/ref_spec.rb
View file @
f39fe34a
...
@@ -78,4 +78,13 @@ describe Gitlab::GitalyClient::Ref do
...
@@ -78,4 +78,13 @@ describe Gitlab::GitalyClient::Ref do
expect
{
client
.
local_branches
(
sort_by:
'invalid_sort'
)
}.
to
raise_error
(
ArgumentError
)
expect
{
client
.
local_branches
(
sort_by:
'invalid_sort'
)
}.
to
raise_error
(
ArgumentError
)
end
end
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
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