home_controller_test.rb revision da23222685bb26d0804bf04c9b726eef2f574b00
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesrequire 'test_helper'
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesclass HomeControllerTest < ActionController::TestCase
16b55a35cff91315d261d1baa776138af465c4e4fuankg
16b55a35cff91315d261d1baa776138af465c4e4fuankg # should route(:get, "/").to(:controller=> :home, :action => :show)
16b55a35cff91315d261d1baa776138af465c4e4fuankg
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes context 'on GET to show' do
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes context 'not signed in' do
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes setup do
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes get :show
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes end
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes should respond_with :success
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg should assign_to :versions
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes should render_template :show
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes end
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes context 'signed in' do
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes setup do
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes sign_in Factory :user
0662ed52e814f8f08ef0e09956413a792584eddffuankg get :show
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes end
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes should respond_with :success
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes should assign_to :versions
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes should render_template :show
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes end
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes end
16b55a35cff91315d261d1baa776138af465c4e4fuankg
16b55a35cff91315d261d1baa776138af465c4e4fuankgend
16b55a35cff91315d261d1baa776138af465c4e4fuankg