Commit f85f65bc authored by Jacob Vosmaer's avatar Jacob Vosmaer

Stub omniauth callback path helper

parent 47fe3559
require "spec_helper"
require 'spec_helper'
require 'omniauth/strategies/kerberos_spnego'
describe 'OmniAuth Kerberos SPNEGO', lib: true do
let(:path) { '/users/auth/kerberos_spnego/negotiate' }
let(:controller_class) { OmniauthKerberosSpnegoController }
before do
# In production user_kerberos_spnego_omniauth_callback_path is defined
# dynamically early when the app boots. Because this is hard to set up
# during testing we stub out this path helper on the controller.
allow_any_instance_of(controller_class).to receive(:user_kerberos_spnego_omniauth_callback_path).
and_return(OmniAuth::Strategies::KerberosSpnego.new(:app).callback_path)
end
it 'asks for an SPNEGO token' do
get path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment