diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-30 01:27:52 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-30 01:27:52 +0000 |
commit | 534f8fc7975f1fe5f38f8d4b2ba3c15ddb8ac9d1 (patch) | |
tree | b90c08cb6f57746d6fcbb02d6193c94fbcb188c9 /spec/services | |
parent | 8d9451dff764300334faf27d40226fb1ae8767ac (diff) | |
parent | 9c8f6e0cdfcf3be90bd819751cf76ba760556d13 (diff) | |
download | gitlab-ce-534f8fc7975f1fe5f38f8d4b2ba3c15ddb8ac9d1.tar.gz |
Merge branch 'determinstic_dns_specs' into 'master'
Have deterministic DNS for specs
See merge request gitlab-org/gitlab-ce!31086
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/download_service_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/services/projects/download_service_spec.rb b/spec/services/projects/download_service_spec.rb index f25233ceeb1..06efc2ff825 100644 --- a/spec/services/projects/download_service_spec.rb +++ b/spec/services/projects/download_service_spec.rb @@ -20,13 +20,8 @@ describe Projects::DownloadService do context 'for URLs that are on the whitelist' do before do - sham_rack_app = ShamRack.at('mycompany.fogbugz.com').stub - sham_rack_app.register_resource('/rails_sample.jpg', File.read(Rails.root + 'spec/fixtures/rails_sample.jpg'), 'image/jpg') - sham_rack_app.register_resource('/doc_sample.txt', File.read(Rails.root + 'spec/fixtures/doc_sample.txt'), 'text/plain') - end - - after do - ShamRack.unmount_all + stub_request(:get, 'http://mycompany.fogbugz.com/rails_sample.jpg').to_return(body: File.read(Rails.root + 'spec/fixtures/rails_sample.jpg')) + stub_request(:get, 'http://mycompany.fogbugz.com/doc_sample.txt').to_return(body: File.read(Rails.root + 'spec/fixtures/doc_sample.txt')) end context 'an image file' do |