Commit c607b1c9 authored by James Lopez's avatar James Lopez
Browse files

fix more specs

parent 9a30adc15fc1
......@@ -465,7 +465,7 @@ def import_url=(value)
import_url = Gitlab::UrlSanitizer.new(value)
super(import_url.sanitized_url)
create_or_update_import_data(credentials: import_url.credentials) unless errors.messages[:import_url]
create_or_update_import_data(credentials: import_url.credentials) if valid_import_url?
end
def import_url
......@@ -477,6 +477,10 @@ def import_url
end
end
def valid_import_url?
valid? || errors.messages[:import_url].nil?
end
def create_or_update_import_data(data: nil, credentials: nil)
project_import_data = import_data || build_import_data
if data
......
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