DEV: Correct OAuth2BasicAuthenticator namespace, remove spec workarounds
This commit is contained in:
parent
72d655bc44
commit
47a8211d9a
|
@ -46,7 +46,7 @@ class ::OmniAuth::Strategies::Oauth2Basic < ::OmniAuth::Strategies::OAuth2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class OAuth2BasicAuthenticator < Auth::ManagedAuthenticator
|
class ::OAuth2BasicAuthenticator < Auth::ManagedAuthenticator
|
||||||
def name
|
def name
|
||||||
'oauth2_basic'
|
'oauth2_basic'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,31 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
require 'json'
|
|
||||||
|
|
||||||
# This is ugly... but it works!
|
|
||||||
# Need to load plugin.rb to avoid:
|
|
||||||
#
|
|
||||||
# NameError:
|
|
||||||
# uninitialized constant OAuth2BasicAuthenticator
|
|
||||||
#
|
|
||||||
# And need to mock various methods to avoid:
|
|
||||||
#
|
|
||||||
# NoMethodError:
|
|
||||||
# undefined method `enabled_site_setting' for main:Object
|
|
||||||
#
|
|
||||||
# etc.
|
|
||||||
|
|
||||||
def enabled_site_setting(arg)
|
|
||||||
end
|
|
||||||
|
|
||||||
def auth_provider(arg)
|
|
||||||
end
|
|
||||||
|
|
||||||
def register_css(arg)
|
|
||||||
end
|
|
||||||
|
|
||||||
require_relative '../plugin.rb'
|
|
||||||
|
|
||||||
describe OAuth2BasicAuthenticator do
|
describe OAuth2BasicAuthenticator do
|
||||||
context 'after_authenticate' do
|
context 'after_authenticate' do
|
||||||
|
|
Loading…
Reference in New Issue