summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/favicon_spec.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-09-27 13:18:49 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2018-06-05 16:20:19 +0200
commit44d7b1583348513f8faa680a864efdbb39be70ab (patch)
tree5c01b45fc377d282eaf861bcc1549c41ee1dd19c /spec/lib/gitlab/favicon_spec.rb
parenta6f3f6b8cd2e79acbc824c401435284635071e1a (diff)
downloadgitlab-ce-44d7b1583348513f8faa680a864efdbb39be70ab.tar.gz
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.rb13
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