use :full_conference factory in the conference view specs
This commit is contained in:
parent
dd5796bd34
commit
1c7becb69a
5 changed files with 38 additions and 63 deletions
|
|
@ -1,10 +1,13 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'admin/conference/index' do
|
||||
let(:conference) { create(:conference, title: 'openSUSE Conference 2016') }
|
||||
let(:second_conference) { create(:conference) }
|
||||
|
||||
it 'renders all conference names with links' do
|
||||
assign(:conferences, [create(:conference, title: 'openSUSE'), create(:conference)])
|
||||
assign(:conferences, [conference, second_conference])
|
||||
render
|
||||
expect(rendered).to include('openSUSE')
|
||||
expect(rendered).to include('The dog and pony show')
|
||||
expect(rendered).to include('openSUSE Conference 2016')
|
||||
expect(rendered).to include(second_conference.title)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'admin/conference/new' do
|
||||
let(:conference) { build(:conference) }
|
||||
|
||||
it 'renders the new template for the conference' do
|
||||
assign(:conference, Conference.new)
|
||||
render
|
||||
expect(rendered).to include('Basic Information')
|
||||
assign(:conference, build(:conference))
|
||||
assign(:conference, conference)
|
||||
render
|
||||
expect(rendered).to include('The dog and pony show')
|
||||
expect(rendered).to include(conference.title)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue