Sha256: f8976e62530d09c052f86b0960b65a70225da8f05a794924a4fa8b1268625886
Contents?: true
Size: 825 Bytes
Versions: 106
Compression:
Stored size: 825 Bytes
Contents
RSpec.describe ApplicationController, type: :controller do controller do before_action :authenticate_user! def index; end end describe "authentication failure handling" do describe "when shibboleth user authentication is required" do before { allow(Ddr::Auth).to receive(:require_shib_user_authn) { true } } it "should redirect to the shib authn path" do get :index expect(response).to redirect_to(user_omniauth_authorize_path(:shibboleth)) end end describe "when shibboleth user authentication is not required" do before { allow(Ddr::Auth).to receive(:require_shib_user_authn) { false } } it "should redirect to the new user session path" do get :index expect(response).to redirect_to(new_user_session_path) end end end end
Version data entries
106 entries across 106 versions & 1 rubygems