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
Léo-Paul Géneau
gitlab-ce
Commits
8b13bdbe
Commit
8b13bdbe
authored
Dec 19, 2017
by
Valery Sizov
Committed by
Nick Thomas
Dec 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CE->EE] Fix spec/lib/gitlab/git/gitlab_projects_spec.rb
parent
7ed3759e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
spec/lib/gitlab/git/gitlab_projects_spec.rb
spec/lib/gitlab/git/gitlab_projects_spec.rb
+4
-2
No files found.
spec/lib/gitlab/git/gitlab_projects_spec.rb
View file @
8b13bdbe
...
@@ -41,7 +41,8 @@ describe Gitlab::Git::GitlabProjects do
...
@@ -41,7 +41,8 @@ describe Gitlab::Git::GitlabProjects do
end
end
it
"fails if the source path doesn't exist"
do
it
"fails if the source path doesn't exist"
do
expect
(
logger
).
to
receive
(
:error
).
with
(
"mv-project failed: source path <
#{
tmp_repos_path
}
/bad-src.git> does not exist."
)
expected_source_path
=
File
.
join
(
tmp_repos_path
,
'bad-src.git'
)
expect
(
logger
).
to
receive
(
:error
).
with
(
"mv-project failed: source path <
#{
expected_source_path
}
> does not exist."
)
result
=
build_gitlab_projects
(
tmp_repos_path
,
'bad-src.git'
).
mv_project
(
'repo.git'
)
result
=
build_gitlab_projects
(
tmp_repos_path
,
'bad-src.git'
).
mv_project
(
'repo.git'
)
expect
(
result
).
to
be_falsy
expect
(
result
).
to
be_falsy
...
@@ -50,7 +51,8 @@ describe Gitlab::Git::GitlabProjects do
...
@@ -50,7 +51,8 @@ describe Gitlab::Git::GitlabProjects do
it
'fails if the destination path already exists'
do
it
'fails if the destination path already exists'
do
FileUtils
.
mkdir_p
(
File
.
join
(
tmp_repos_path
,
'already-exists.git'
))
FileUtils
.
mkdir_p
(
File
.
join
(
tmp_repos_path
,
'already-exists.git'
))
message
=
"mv-project failed: destination path <
#{
tmp_repos_path
}
/already-exists.git> already exists."
expected_distination_path
=
File
.
join
(
tmp_repos_path
,
'already-exists.git'
)
message
=
"mv-project failed: destination path <
#{
expected_distination_path
}
> already exists."
expect
(
logger
).
to
receive
(
:error
).
with
(
message
)
expect
(
logger
).
to
receive
(
:error
).
with
(
message
)
expect
(
gl_projects
.
mv_project
(
'already-exists.git'
)).
to
be_falsy
expect
(
gl_projects
.
mv_project
(
'already-exists.git'
)).
to
be_falsy
...
...
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