diff --git a/spec/controllers/conversations_controller_spec.rb b/spec/controllers/conversations_controller_spec.rb index c3e94af30..7d3bed8d9 100644 --- a/spec/controllers/conversations_controller_spec.rb +++ b/spec/controllers/conversations_controller_spec.rb @@ -136,13 +136,19 @@ describe ConversationsController do } @conversation = Conversation.create(hash) end - + it 'succeeds' do - get :show, :id => @conversation.id + get :show, :id => @conversation.id, :format => :js response.should be_success assigns[:conversation].should == @conversation end + it 'redirects to index' do + get :show, :id => @conversation.id + response.should redirect_to(conversations_path(:conversation_id => @conversation.id)) + assigns[:conversation].should == @conversation + end + it 'does not let you access conversations where you are not a recipient' do sign_in :user, eve