Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 00:07:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 00:07:54 +0300
commit2fd92f2dc784ade9cb4e1c33dd60cbfad7b86818 (patch)
tree7779f36689db97a46e0268a4aec1d49f283eb0c8 /spec/models/badge_spec.rb
parent42ca24aa5bbab7a2d43bc866d9bee9876941cea2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/badge_spec.rb')
-rw-r--r--spec/models/badge_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/badge_spec.rb b/spec/models/badge_spec.rb
index 60ae579eb03..fba8f40e99b 100644
--- a/spec/models/badge_spec.rb
+++ b/spec/models/badge_spec.rb
@@ -91,6 +91,22 @@ describe Badge do
let(:method) { :image_url }
it_behaves_like 'rendered_links'
+
+ context 'when asset proxy is enabled' do
+ let(:placeholder_url) { 'http://www.example.com/image' }
+
+ before do
+ stub_asset_proxy_setting(
+ enabled: true,
+ url: 'https://assets.example.com',
+ secret_key: 'shared-secret'
+ )
+ end
+
+ it 'returns a proxied URL' do
+ expect(badge.rendered_image_url).to start_with('https://assets.example.com')
+ end
+ end
end
end
end