use :full_conference factory in the conference view specs

This commit is contained in:
Henne Vogelsang 2016-05-02 15:21:45 +02:00
parent dd5796bd34
commit 1c7becb69a
5 changed files with 38 additions and 63 deletions

View file

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