Fixed view specs, passing
This commit is contained in:
parent
e2fd1bbd69
commit
2d87610a97
1 changed files with 7 additions and 8 deletions
|
|
@ -1,21 +1,20 @@
|
|||
require 'spec_helper'
|
||||
describe 'conference/show.html.haml' do
|
||||
it 'renders program partial' do
|
||||
@conference = create(:conference, description: 'Lorem Ipsum')
|
||||
before(:each) do
|
||||
@conference = create(:conference, registration_description: 'Lorem Ipsum Dolor',
|
||||
registration_start_date: Date.today,
|
||||
registration_end_date: Date.tomorrow,
|
||||
description: 'Lorem Ipsum')
|
||||
assign :conference, @conference
|
||||
render
|
||||
end
|
||||
it 'renders program partial' do
|
||||
expect(render).to include("#{@conference.description}")
|
||||
expect(view).to render_template(partial: 'conference/_program')
|
||||
end
|
||||
|
||||
it 'renders registration partial' do
|
||||
@conference = create(:conference, registration_description: 'Lorem Ipsum Dolor',
|
||||
registration_start_date: Date.today,
|
||||
registration_end_date: Date.tomorrow)
|
||||
assign :conference, @conference
|
||||
render
|
||||
expect(rendered).to include("#{@conference.registration_description}")
|
||||
expect(rendered).to include("Register for #{@conference.short_title}")
|
||||
expect(view).to render_template(partial: 'conference/_registration')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue