diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 03:07:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 03:07:49 +0300 |
commit | 77237c5a6b9044f58beabc54d3589e5fa09cbfba (patch) | |
tree | f43188047fe8955f6cf78e05ae9c2e8f6a019e0b /spec/lib/gitlab/asset_proxy_spec.rb | |
parent | 2fd92f2dc784ade9cb4e1c33dd60cbfad7b86818 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/asset_proxy_spec.rb')
-rw-r--r-- | spec/lib/gitlab/asset_proxy_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/lib/gitlab/asset_proxy_spec.rb b/spec/lib/gitlab/asset_proxy_spec.rb index f5aa1819982..e406917a5a4 100644 --- a/spec/lib/gitlab/asset_proxy_spec.rb +++ b/spec/lib/gitlab/asset_proxy_spec.rb @@ -33,9 +33,15 @@ describe Gitlab::AssetProxy do expect(described_class.proxy_url(url)).to eq(proxied_url) end + it 'returns original URL for invalid domains' do + url = 'foo_bar://' + + expect(described_class.proxy_url(url)).to eq(url) + end + context 'whitelisted domain' do it 'returns original URL for single domain whitelist' do - url = 'http://gitlab.com/test.png' + url = 'http://gitlab.com/${default_branch}/test.png' expect(described_class.proxy_url(url)).to eq(url) end |