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
Jérome Perrin
gitlab-ce
Commits
f0ad0cef
Commit
f0ad0cef
authored
Oct 18, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GitHub importer spec
parent
1a41a89c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/github_import/label_formatter.rb
lib/gitlab/github_import/label_formatter.rb
+4
-1
spec/lib/gitlab/github_import/importer_spec.rb
spec/lib/gitlab/github_import/importer_spec.rb
+1
-1
No files found.
lib/gitlab/github_import/label_formatter.rb
View file @
f0ad0cef
...
...
@@ -16,8 +16,11 @@ module Gitlab
def
create!
params
=
attributes
.
except
(
:project
)
service
=
::
Labels
::
CreateService
.
new
(
project
.
owner
,
project
,
params
)
label
=
service
.
execute
service
.
execute
raise
ActiveRecord
::
RecordInvalid
.
new
(
label
)
unless
label
.
persisted?
label
end
private
...
...
spec/lib/gitlab/github_import/importer_spec.rb
View file @
f0ad0cef
...
...
@@ -157,7 +157,7 @@ describe Gitlab::GithubImport::Importer, lib: true do
{
type: :pull_request
,
url:
"https://api.github.com/repos/octocat/Hello-World/pulls/1347"
,
errors:
"Validation failed: Validate branches Cannot Create: This merge request already exists: [
\"
New feature
\"
]"
},
{
type: :wiki
,
errors:
"Gitlab::Shell::Error"
},
{
type: :release
,
url:
'https://api.github.com/repos/octocat/Hello-World/releases/2'
,
errors:
"Validation failed: Description can't be blank"
}
]
]
}
described_class
.
new
(
project
).
execute
...
...
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