forked from Sorcery/sorcery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the way the external provider class is instantiated for providers…
… with plural names (Sorcery#305) * Fix the way the external provider class is instantiated * added a spec * Updated changelog * Fixed mistake in changelog * Add changelog additions under HEAD instead of under new version number.
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
require 'sorcery/providers/base' | ||
|
||
describe Sorcery::Providers::Examples do | ||
before(:all) do | ||
sorcery_reload!([:external]) | ||
sorcery_controller_property_set(:external_providers, [:examples]) | ||
end | ||
|
||
context 'fetching a plural custom provider' do | ||
it 'returns the provider' do | ||
expect(Sorcery::Controller::Config.examples).to be_a(Sorcery::Providers::Examples) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'sorcery/providers/base' | ||
|
||
module Sorcery | ||
module Providers | ||
class Examples < Base | ||
include Protocols::Oauth2 | ||
end | ||
end | ||
end |