summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/favicon_spec.rb
diff options
context:
space:
mode:
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