Merge pull request #150 from gopesht/callforapapers_compoenent

Callforapapers compoenent
This commit is contained in:
Gopesh Tulsyan 2014-05-31 00:17:28 +05:30
commit c3d3440745
4 changed files with 68 additions and 0 deletions

View file

@ -6,5 +6,6 @@ FactoryGirl.define do
end_date Date.today + 7
hard_deadline Date.today + 8
description 'We call for papers'
conference
end
end

View file

@ -5,9 +5,11 @@ describe 'conference/show.html.haml' do
registration_start_date: Date.today,
registration_end_date: Date.tomorrow,
description: 'Lorem Ipsum')
@conference.call_for_papers = create(:call_for_papers, conference: @conference)
assign :conference, @conference
render
end
it 'renders program partial' do
expect(render).to include("#{@conference.description}")
expect(view).to render_template(partial: 'conference/_program')
@ -17,4 +19,8 @@ describe 'conference/show.html.haml' do
expect(rendered).to include("#{@conference.registration_description}")
expect(view).to render_template(partial: 'conference/_registration')
end
it 'renders call_for_papers partial' do
expect(render).to include("#{@conference.call_for_papers.description}")
end
end