From 89e759daf6d0b55b0b2adb173cf97f5f2649d280 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Wed, 28 May 2014 15:06:08 +0530 Subject: [PATCH] Controller test for Conference#show --- spec/controllers/conference_controller_spec.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/spec/controllers/conference_controller_spec.rb b/spec/controllers/conference_controller_spec.rb index 464288cd..15ff4989 100644 --- a/spec/controllers/conference_controller_spec.rb +++ b/spec/controllers/conference_controller_spec.rb @@ -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