Skip to content
Snippets Groups Projects
Commit f0ad0cef authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Fix GitHub importer spec

parent 1a41a89c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment