Commit 1885a301 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests in import_sources_spec.rb

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c1af6e4b
......@@ -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)
......
......@@ -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
......
......@@ -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|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment