diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-27 14:18:49 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2018-06-05 17:20:19 +0300 |
commit | 44d7b1583348513f8faa680a864efdbb39be70ab (patch) | |
tree | 5c01b45fc377d282eaf861bcc1549c41ee1dd19c /spec/lib/gitlab/favicon_spec.rb | |
parent | a6f3f6b8cd2e79acbc824c401435284635071e1a (diff) |
use custom favicon for ci build status favicons
Diffstat (limited to 'spec/lib/gitlab/favicon_spec.rb')
-rw-r--r-- | spec/lib/gitlab/favicon_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/gitlab/favicon_spec.rb b/spec/lib/gitlab/favicon_spec.rb index 51a8ed47abf..d74dabf1458 100644 --- a/spec/lib/gitlab/favicon_spec.rb +++ b/spec/lib/gitlab/favicon_spec.rb @@ -22,4 +22,17 @@ RSpec.describe Gitlab::Favicon do expect(described_class.default).to match %r{/uploads/-/system/appearance/favicon/\d+/default_dk.ico} end end + + describe '.status' do + subject { described_class.status('created') } + + it 'defaults to the stock icon' do + expect(subject).to eq 'ci_favicons/favicon_status_created.ico' + end + + it 'uses the custom favicon if a favicon appearance is present' do + create :appearance, favicon: fixture_file_upload(Rails.root.join('spec/fixtures/dk.png')) + expect(subject).to match(%r{/uploads/-/system/appearance/favicon/\d+/status_created_dk.ico}) + end + end end |