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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
88d2517e
Commit
88d2517e
authored
Oct 09, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `Gitlab::Git::Repository#fetch` command
parent
4154fa28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+15
-0
No files found.
spec/lib/gitlab/git/repository_spec.rb
View file @
88d2517e
...
...
@@ -1685,6 +1685,21 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
describe
'#fetch'
do
let
(
:git_path
)
{
Gitlab
.
config
.
git
.
bin_path
}
let
(
:remote_name
)
{
'my_remote'
}
subject
{
repository
.
fetch
(
remote_name
)
}
it
'fetches the remote and returns true if the command was successful'
do
expect
(
repository
).
to
receive
(
:popen
)
.
with
(
%W(
#{
git_path
}
fetch
#{
remote_name
}
)
,
repository
.
path
)
.
and_return
([
''
,
0
])
expect
(
subject
).
to
be
(
true
)
end
end
def
create_remote_branch
(
repository
,
remote_name
,
branch_name
,
source_branch_name
)
source_branch
=
repository
.
branches
.
find
{
|
branch
|
branch
.
name
==
source_branch_name
}
rugged
=
repository
.
rugged
...
...
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