diff options
Diffstat (limited to 'spec/services/projects/import_service_spec.rb')
-rw-r--r-- | spec/services/projects/import_service_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/projects/import_service_spec.rb b/spec/services/projects/import_service_spec.rb index ab9f99f893d..6dc72948541 100644 --- a/spec/services/projects/import_service_spec.rb +++ b/spec/services/projects/import_service_spec.rb @@ -276,6 +276,15 @@ RSpec.describe Projects::ImportService do expect(result[:status]).to eq :error expect(result[:message]).to include('Only allowed ports are 80, 443') end + + it 'fails with file scheme' do + project.import_url = "file:///tmp/dir.git" + + result = subject.execute + + expect(result[:status]).to eq :error + expect(result[:message]).to include('Only allowed schemes are http, https') + end end it_behaves_like 'measurable service' do |