Merge branch 'snap-cloud-michael/delint' into 176879873-fix-travis-tests
This commit is contained in:
commit
091105270b
3 changed files with 22 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ describe UserDatatable do
|
|||
end
|
||||
|
||||
let(:data_cols) do
|
||||
[:id, :confirmed_at, :email, :name, :attended, :roles, :view_url, :edit_url, :DT_RowId]
|
||||
[:id, :confirmed_at, :email, :name, :username, :attended, :roles, :view_url, :edit_url, :DT_RowId]
|
||||
end
|
||||
let(:view) do
|
||||
view = double(
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ describe ApplicationHelper, type: :helper do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'navigation title link' do
|
||||
describe 'navigation image link' do
|
||||
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')
|
||||
|
|
@ -73,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'])
|
||||
end
|
||||
|
||||
# TODO-SNAPCON: This is an indicator in a conference it should be the conference name.
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue