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
1885a301
Commit
1885a301
authored
Jul 05, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests in import_sources_spec.rb
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c1af6e4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
app/controllers/import/manifest_controller.rb
app/controllers/import/manifest_controller.rb
+1
-1
lib/gitlab/import_sources.rb
lib/gitlab/import_sources.rb
+1
-1
spec/lib/gitlab/import_sources_spec.rb
spec/lib/gitlab/import_sources_spec.rb
+8
-3
No files found.
app/controllers/import/manifest_controller.rb
View file @
1885a301
...
...
@@ -20,7 +20,7 @@ class Import::ManifestController < Import::BaseController
unless
can?
(
current_user
,
:create_projects
,
group
)
@errors
=
[
"You don't have enough permissions to create projects in the selected group"
]
render
:new
and
return
render
:new
&&
return
end
manifest
=
Gitlab
::
ManifestImport
::
Manifest
.
new
(
params
[
:manifest
].
tempfile
)
...
...
lib/gitlab/import_sources.rb
View file @
1885a301
...
...
@@ -17,7 +17,7 @@ module Gitlab
ImportSource
.
new
(
'git'
,
'Repo by URL'
,
nil
),
ImportSource
.
new
(
'gitlab_project'
,
'GitLab export'
,
Gitlab
::
ImportExport
::
Importer
),
ImportSource
.
new
(
'gitea'
,
'Gitea'
,
Gitlab
::
LegacyGithubImport
::
Importer
),
ImportSource
.
new
(
'manifest'
,
'Manifest
'
,
Gitlab
::
ManifestImport
::
Importer
)
ImportSource
.
new
(
'manifest'
,
'Manifest
file'
,
Gitlab
::
ManifestImport
::
Importer
)
].
freeze
class
<<
self
...
...
spec/lib/gitlab/import_sources_spec.rb
View file @
1885a301
...
...
@@ -12,7 +12,8 @@ describe Gitlab::ImportSources do
'FogBugz'
=>
'fogbugz'
,
'Repo by URL'
=>
'git'
,
'GitLab export'
=>
'gitlab_project'
,
'Gitea'
=>
'gitea'
'Gitea'
=>
'gitea'
,
'Manifest file'
=>
'manifest'
}
expect
(
described_class
.
options
).
to
eq
(
expected
)
...
...
@@ -31,6 +32,7 @@ describe Gitlab::ImportSources do
git
gitlab_project
gitea
manifest
)
expect
(
described_class
.
values
).
to
eq
(
expected
)
...
...
@@ -48,6 +50,7 @@ describe Gitlab::ImportSources do
fogbugz
gitlab_project
gitea
manifest
)
expect
(
described_class
.
importer_names
).
to
eq
(
expected
)
...
...
@@ -63,7 +66,8 @@ describe Gitlab::ImportSources do
'fogbugz'
=>
Gitlab
::
FogbugzImport
::
Importer
,
'git'
=>
nil
,
'gitlab_project'
=>
Gitlab
::
ImportExport
::
Importer
,
'gitea'
=>
Gitlab
::
LegacyGithubImport
::
Importer
'gitea'
=>
Gitlab
::
LegacyGithubImport
::
Importer
,
'manifest'
=>
Gitlab
::
ManifestImport
::
Importer
}
import_sources
.
each
do
|
name
,
klass
|
...
...
@@ -82,7 +86,8 @@ describe Gitlab::ImportSources do
'fogbugz'
=>
'FogBugz'
,
'git'
=>
'Repo by URL'
,
'gitlab_project'
=>
'GitLab export'
,
'gitea'
=>
'Gitea'
'gitea'
=>
'Gitea'
,
'manifest'
=>
'Manifest file'
}
import_sources
.
each
do
|
name
,
title
|
...
...
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