[test] Add unit test for conference_helper#conference_color
This commit is contained in:
parent
72dd36993b
commit
2bcd7d39b3
2 changed files with 12 additions and 0 deletions
|
|
@ -88,4 +88,15 @@ describe ConferenceHelper, type: :helper do
|
|||
expect(conference_logo_url(conference2)).to include('2.png')
|
||||
end
|
||||
end
|
||||
|
||||
describe '#conference_color' do
|
||||
let(:conference2) { create(:conference, color: '#000000') }
|
||||
|
||||
it 'gives the correct conference color' do
|
||||
expect(conference_color(conference2)).to eq('#000000')
|
||||
|
||||
conference2.color = ''
|
||||
expect(conference_color(conference2)).to eq('#0B3559')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue