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
805a8811
Commit
805a8811
authored
Jul 17, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs for Bitbucket Server
parent
6a992fb4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
app/views/import/bitbucket_server/new.html.haml
app/views/import/bitbucket_server/new.html.haml
+1
-1
spec/lib/gitlab/import_sources_spec.rb
spec/lib/gitlab/import_sources_spec.rb
+16
-11
No files found.
app/views/import/bitbucket_server/new.html.haml
View file @
805a8811
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
.form-group.row
.form-group.row
=
label_tag
:bitbucket_server_url
,
'Bitbucket Server URL'
,
class:
'col-form-label col-md-2'
=
label_tag
:bitbucket_server_url
,
'Bitbucket Server URL'
,
class:
'col-form-label col-md-2'
.col-md-4
.col-md-4
=
text_field_tag
:bitbucket_server_url
,
''
,
class:
'form-control append-right-8'
,
placeholder:
_
(
'
https://bitbucket-s
erver'
),
size:
40
=
text_field_tag
:bitbucket_server_url
,
''
,
class:
'form-control append-right-8'
,
placeholder:
_
(
'
URL for Bitbucket S
erver'
),
size:
40
.form-group.row
.form-group.row
=
label_tag
:bitbucket_server_url
,
'Username'
,
class:
'col-form-label col-md-2'
=
label_tag
:bitbucket_server_url
,
'Username'
,
class:
'col-form-label col-md-2'
.col-md-4
.col-md-4
...
...
spec/lib/gitlab/import_sources_spec.rb
View file @
805a8811
...
@@ -6,7 +6,8 @@ describe Gitlab::ImportSources do
...
@@ -6,7 +6,8 @@ describe Gitlab::ImportSources do
expected
=
expected
=
{
{
'GitHub'
=>
'github'
,
'GitHub'
=>
'github'
,
'Bitbucket'
=>
'bitbucket'
,
'Bitbucket Cloud'
=>
'bitbucket'
,
'Bitbucket Server'
=>
'bitbucket_server'
,
'GitLab.com'
=>
'gitlab'
,
'GitLab.com'
=>
'gitlab'
,
'Google Code'
=>
'google_code'
,
'Google Code'
=>
'google_code'
,
'FogBugz'
=>
'fogbugz'
,
'FogBugz'
=>
'fogbugz'
,
...
@@ -26,6 +27,7 @@ describe Gitlab::ImportSources do
...
@@ -26,6 +27,7 @@ describe Gitlab::ImportSources do
%w(
%w(
github
github
bitbucket
bitbucket
bitbucket_server
gitlab
gitlab
google_code
google_code
fogbugz
fogbugz
...
@@ -45,6 +47,7 @@ describe Gitlab::ImportSources do
...
@@ -45,6 +47,7 @@ describe Gitlab::ImportSources do
%w(
%w(
github
github
bitbucket
bitbucket
bitbucket_server
gitlab
gitlab
google_code
google_code
fogbugz
fogbugz
...
@@ -60,6 +63,7 @@ describe Gitlab::ImportSources do
...
@@ -60,6 +63,7 @@ describe Gitlab::ImportSources do
import_sources
=
{
import_sources
=
{
'github'
=>
Gitlab
::
GithubImport
::
ParallelImporter
,
'github'
=>
Gitlab
::
GithubImport
::
ParallelImporter
,
'bitbucket'
=>
Gitlab
::
BitbucketImport
::
Importer
,
'bitbucket'
=>
Gitlab
::
BitbucketImport
::
Importer
,
'bitbucket_server'
=>
Gitlab
::
BitbucketServerImport
::
Importer
,
'gitlab'
=>
Gitlab
::
GitlabImport
::
Importer
,
'gitlab'
=>
Gitlab
::
GitlabImport
::
Importer
,
'google_code'
=>
Gitlab
::
GoogleCodeImport
::
Importer
,
'google_code'
=>
Gitlab
::
GoogleCodeImport
::
Importer
,
'fogbugz'
=>
Gitlab
::
FogbugzImport
::
Importer
,
'fogbugz'
=>
Gitlab
::
FogbugzImport
::
Importer
,
...
@@ -79,7 +83,8 @@ describe Gitlab::ImportSources do
...
@@ -79,7 +83,8 @@ describe Gitlab::ImportSources do
describe
'.title'
do
describe
'.title'
do
import_sources
=
{
import_sources
=
{
'github'
=>
'GitHub'
,
'github'
=>
'GitHub'
,
'bitbucket'
=>
'Bitbucket'
,
'bitbucket'
=>
'Bitbucket Cloud'
,
'bitbucket_server'
=>
'Bitbucket Server'
,
'gitlab'
=>
'GitLab.com'
,
'gitlab'
=>
'GitLab.com'
,
'google_code'
=>
'Google Code'
,
'google_code'
=>
'Google Code'
,
'fogbugz'
=>
'FogBugz'
,
'fogbugz'
=>
'FogBugz'
,
...
@@ -97,7 +102,7 @@ describe Gitlab::ImportSources do
...
@@ -97,7 +102,7 @@ describe Gitlab::ImportSources do
end
end
describe
'imports_repository? checker'
do
describe
'imports_repository? checker'
do
let
(
:allowed_importers
)
{
%w[github gitlab_project]
}
let
(
:allowed_importers
)
{
%w[github gitlab_project
bitbucket_server
]
}
it
'fails if any importer other than the allowed ones implements this method'
do
it
'fails if any importer other than the allowed ones implements this method'
do
current_importers
=
described_class
.
values
.
select
{
|
kind
|
described_class
.
importer
(
kind
).
try
(
:imports_repository?
)
}
current_importers
=
described_class
.
values
.
select
{
|
kind
|
described_class
.
importer
(
kind
).
try
(
:imports_repository?
)
}
...
...
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