Controller test for Conference#show

This commit is contained in:
Gopesh Tulsyan 2014-05-28 15:06:08 +05:30
parent a33e930111
commit 89e759daf6

View file

@ -1,11 +1,16 @@
require 'spec_helper'
describe ConferenceController do
let(:conference) { create(:conference) }
describe 'GET #show' do
it 'returns http success' do
get :show, id: 'sample'
expect(response).to be_success
it 'assigns the requested conference to conference' do
get :show, id: conference.short_title
expect(assigns(:conference)).to eq conference
end
it 'renders the show template' do
get :show, id: conference.short_title
expect(response).to render_template :show
end
end
end