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:
authorAsh McKenzie <amckenzie@gitlab.com>2019-08-28 04:53:46 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-08-28 05:01:44 +0300
commitd5dc50392df3eff21a0b2771174f89f54e0b15f8 (patch)
tree026102acf382338f60ecbc97090877c6bf0ea139 /spec/lib/gitlab/favicon_spec.rb
parent834f7861e57769d47ebf4dc7ac6b57b39064f8fc (diff)
Use new RailsHelpers module
Diffstat (limited to 'spec/lib/gitlab/favicon_spec.rb')
-rw-r--r--spec/lib/gitlab/favicon_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/favicon_spec.rb b/spec/lib/gitlab/favicon_spec.rb
index dce56bbd2c4..965726980b5 100644
--- a/spec/lib/gitlab/favicon_spec.rb
+++ b/spec/lib/gitlab/favicon_spec.rb
@@ -1,14 +1,16 @@
require 'rails_helper'
RSpec.describe Gitlab::Favicon, :request_store do
+ include RailsHelpers
+
describe '.main' do
it 'defaults to favicon.png' do
- allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production'))
+ stub_rails_env('production')
expect(described_class.main).to match_asset_path '/assets/favicon.png'
end
it 'has blue favicon for development', unless: Gitlab.ee? do
- allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('development'))
+ stub_rails_env('development')
expect(described_class.main).to match_asset_path '/assets/favicon-blue.png'
end
@@ -24,7 +26,7 @@ RSpec.describe Gitlab::Favicon, :request_store do
context 'asset host' do
before do
- allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production'))
+ stub_rails_env('production')
end
it 'returns a relative url when the asset host is not configured' do