More image/nav tests
This commit is contained in:
parent
005aebd936
commit
c170221605
1 changed files with 19 additions and 7 deletions
|
|
@ -62,12 +62,7 @@ describe ApplicationHelper, type: :helper do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'navigation title link' do
|
describe 'navigation image 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')
|
||||||
|
|
@ -78,8 +73,25 @@ describe ApplicationHelper, type: :helper do
|
||||||
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: ENV['OSEM_NAME'])
|
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: ENV['OSEM_NAME'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO-SNAPCON: This is an indicator in a conference it should be the conference name.
|
||||||
it 'should use the conference organization name' do
|
it 'should use the conference organization name' do
|
||||||
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: conference.title)
|
expect(nav_root_link_for(nil)).to include image_tag('snapcon_logo.png', alt: conference.organization.name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe 'navigation link titke text' do
|
||||||
|
it 'should default to OSEM' do
|
||||||
|
ENV.delete('OSEM_NAME')
|
||||||
|
expect(nav_link_text(nil)).to match 'OSEM'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should use the environment variable' do
|
||||||
|
ENV['OSEM_NAME'] = Faker::Company.name + "'"
|
||||||
|
expect(nav_link_text(nil)).to match ENV['OSEM_NAME']
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should use the conference organization name' do
|
||||||
|
expect(nav_link_text(nil)).to match conference.organization.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue