FEATURE: report on admin dashboard when favicon is failing to load

This commit is contained in:
Neil Lalonde
2016-04-05 14:42:24 -04:00
parent d402a45781
commit 56e47c8d7e
4 changed files with 50 additions and 2 deletions

View File

@ -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