Minor app helper tests
This commit is contained in:
parent
92f23a519e
commit
005aebd936
2 changed files with 7 additions and 1 deletions
|
|
@ -188,7 +188,8 @@ module ApplicationHelper
|
||||||
'hidden' if Date.today > conference.end_date
|
'hidden' if Date.today > conference.end_date
|
||||||
end
|
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)
|
def nav_root_link_for(conference = nil)
|
||||||
path = conference&.id.present? ? conference_path(conference) : root_path
|
path = conference&.id.present? ? conference_path(conference) : root_path
|
||||||
link_to(
|
link_to(
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,11 @@ describe ApplicationHelper, type: :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'navigation title link' do
|
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
|
it 'should default to OSEM' do
|
||||||
ENV.delete('OSEM_NAME')
|
ENV.delete('OSEM_NAME')
|
||||||
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: 'OSEM')
|
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: 'OSEM')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue