[test] Add unit test for conference_helper#conference_color

This commit is contained in:
Jimmy 2021-03-12 07:49:55 -08:00
parent 72dd36993b
commit 2bcd7d39b3
2 changed files with 12 additions and 0 deletions

View file

@ -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