forked from External/greenlight
change sessions#new test to allow redirect
This commit is contained in:
parent
d80fd262bc
commit
43496a6cf1
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue