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:
authorMek Stittri <mstittri@gitlab.com>2018-06-20 18:05:56 +0300
committerMek Stittri <mstittri@gitlab.com>2018-06-20 18:05:56 +0300
commit3e28cca5744410a82131bf02e17d785c7223d44b (patch)
tree2a5713659df1ed0c6865714032af9ac2c8f73b2a /spec/lib/gitlab/favicon_spec.rb
parentacdc0d73274b80fb104eea73e86eb4b9f92c848d (diff)
parentabc6be62a06349f395da0b33e814512ef15c06fb (diff)
Resolve conflicts with latest workflow label changes
Diffstat (limited to 'spec/lib/gitlab/favicon_spec.rb')
-rw-r--r--spec/lib/gitlab/favicon_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/favicon_spec.rb b/spec/lib/gitlab/favicon_spec.rb
index f36111a4946..122dcd9634c 100644
--- a/spec/lib/gitlab/favicon_spec.rb
+++ b/spec/lib/gitlab/favicon_spec.rb
@@ -21,6 +21,21 @@ RSpec.describe Gitlab::Favicon, :request_store do
create :appearance, favicon: fixture_file_upload('spec/fixtures/dk.png')
expect(described_class.main).to match %r{/uploads/-/system/appearance/favicon/\d+/dk.png}
end
+
+ context 'asset host' do
+ before do
+ allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production'))
+ end
+
+ it 'returns a relative url when the asset host is not configured' do
+ expect(described_class.main).to match %r{^/assets/favicon-(?:\h+).png$}
+ end
+
+ it 'returns a full url when the asset host is configured' do
+ allow(Gitlab::Application.config).to receive(:asset_host).and_return('http://assets.local')
+ expect(described_class.main).to match %r{^http://localhost/assets/favicon-(?:\h+).png$}
+ end
+ end
end
describe '.status_overlay' do