Chris@909: require File.expand_path('../../test_helper', __FILE__) Chris@909: Chris@909: class LdapAuthSourcesControllerTest < ActionController::TestCase Chris@909: Chris@909: def setup Chris@909: @request.session[:user_id] = 1 Chris@909: end Chris@909: Chris@909: context "get :new" do Chris@909: setup do Chris@909: get :new Chris@909: end Chris@909: Chris@909: should_assign_to :auth_source Chris@909: should_respond_with :success Chris@909: should_render_template :new Chris@909: Chris@909: should "initilize a new AuthSource" do Chris@909: assert_equal AuthSourceLdap, assigns(:auth_source).class Chris@909: assert assigns(:auth_source).new_record? Chris@909: end Chris@909: end Chris@909: end