diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-29 08:54:15 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-29 08:54:15 +0000 |
commit | 4fc3a39c6237651f3a35c286eac61118a3700262 (patch) | |
tree | 967f22328d271b7d66871c06e2499d86c9434430 /spec | |
parent | 89a3572bfe15c5a627c7f5646a997179e686ee27 (diff) | |
parent | 7a36fd106fd3041ef77a18fff971344fbdab7e7d (diff) | |
download | gitlab-ce-4fc3a39c6237651f3a35c286eac61118a3700262.tar.gz |
Merge branch 'add-canary-favicon' into 'master'
Add canary favicon
See merge request gitlab-org/gitlab-ce!12477
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/page_layout_helper_spec.rb | 5 | ||||
-rw-r--r-- | spec/serializers/status_entity_spec.rb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/page_layout_helper_spec.rb b/spec/helpers/page_layout_helper_spec.rb index baf927a9acc..b77114a8152 100644 --- a/spec/helpers/page_layout_helper_spec.rb +++ b/spec/helpers/page_layout_helper_spec.rb @@ -50,6 +50,11 @@ describe PageLayoutHelper do allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('development')) expect(helper.favicon).to eq 'favicon-blue.ico' end + + it 'has yellow favicon for canary' do + stub_env('CANARY', 'true') + expect(helper.favicon).to eq 'favicon-yellow.ico' + end end describe 'page_image' do diff --git a/spec/serializers/status_entity_spec.rb b/spec/serializers/status_entity_spec.rb index 16431ed4188..70402bac2e2 100644 --- a/spec/serializers/status_entity_spec.rb +++ b/spec/serializers/status_entity_spec.rb @@ -25,5 +25,10 @@ describe StatusEntity do allow(Rails.env).to receive(:development?) { true } expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/dev/favicon_status_success.ico') end + + it 'contains a canary namespaced favicon if canary env' do + stub_env('CANARY', 'true') + expect(entity.as_json[:favicon]).to match_asset_path('/assets/ci_favicons/canary/favicon_status_success.ico') + end end end |