Minor app helper tests

This commit is contained in:
Michael Ball 2021-02-24 20:07:12 -08:00
parent 92f23a519e
commit 005aebd936
2 changed files with 7 additions and 1 deletions

View file

@ -188,7 +188,8 @@ module ApplicationHelper
'hidden' if Date.today > conference.end_date
end
# TODO:Snap!Con: Replace this with a search for a conference logo.
# TODO-SNAPCON: Replace this with a search for a conference logo.
# TODO: If conference is defined, the alt text should be conference name.
def nav_root_link_for(conference = nil)
path = conference&.id.present? ? conference_path(conference) : root_path
link_to(

View file

@ -63,6 +63,11 @@ describe ApplicationHelper, type: :helper do
end
describe 'navigation title link' do
it 'should default to OSEM' do
ENV.delete('OSEM_NAME')
expect(nav_link_text(nil)).to match 'OSEM'
end
it 'should default to OSEM' do
ENV.delete('OSEM_NAME')
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: 'OSEM')