mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 09:17:15 +08:00
FEATURE: report on admin dashboard when favicon is failing to load
This commit is contained in:
@ -278,4 +278,26 @@ describe AdminDashboardData do
|
||||
include_examples 'stats cachable'
|
||||
end
|
||||
|
||||
describe '#problem_message_check' do
|
||||
let(:key) { AdminDashboardData.problem_messages.first }
|
||||
|
||||
before do
|
||||
described_class.clear_problem_message(key)
|
||||
end
|
||||
|
||||
it 'returns nil if message has not been added' do
|
||||
expect(described_class.problem_message_check(key)).to be_nil
|
||||
end
|
||||
|
||||
it 'returns a message if it was added' do
|
||||
described_class.add_problem_message(key)
|
||||
expect(described_class.problem_message_check(key)).to eq(I18n.t(key))
|
||||
end
|
||||
|
||||
it 'returns a message if it was added with an expiry' do
|
||||
described_class.add_problem_message(key, 300)
|
||||
expect(described_class.problem_message_check(key)).to eq(I18n.t(key))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user