change sessions#new test to allow redirect

This commit is contained in:
Josh 2017-07-07 10:23:19 -04:00
parent d80fd262bc
commit 43496a6cf1
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@
class SessionsController < ApplicationController
skip_before_filter :verify_authenticity_token
skip_before_action :verify_authenticity_token
def new
# If LDAP is enabled, just route to it instead.

View File

@ -8,7 +8,12 @@ class SessionsControllerTest < ActionController::TestCase
test "should get new" do
get :new
assert_response :success
# We redirect directly to LDAP if configured.
if ENV['LDAP_SERVER'].present?
assert_response :redirect
else
assert_response :success
end
end
test "should redirect to home on auth failture" do