Commit 28df200c authored by James Lopez's avatar James Lopez

fixed failing specs

parent 459ad344
...@@ -20,7 +20,7 @@ module Gitlab ...@@ -20,7 +20,7 @@ module Gitlab
private private
def generate_full_url def generate_full_url
return @url unless credentials return @url unless valid_credentials?
@full_url = @url.dup @full_url = @url.dup
@full_url.user = credentials[:user] @full_url.user = credentials[:user]
@full_url.password = credentials[:password] @full_url.password = credentials[:password]
...@@ -33,5 +33,9 @@ module Gitlab ...@@ -33,5 +33,9 @@ module Gitlab
safe_url.user = nil safe_url.user = nil
safe_url safe_url
end end
def valid_credentials?
credentials && credentials.is_a?(Hash) && credentials.any?
end
end end
end end
FactoryGirl.define do FactoryGirl.define do
factory :project_import_data, class: ProjectImportData do factory :project_import_data, class: ProjectImportData do
data "test" data "test"
project
end end
end end
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