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