mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 15:05:25 -05:00
REFACTOR: Serve auth provider information in the site serializer.
At the moment core providers are hard-coded in Javascript, and plugin providers get added to the JS payload at compile time. This refactor means that we only ship enabled providers to the client.
This commit is contained in:
@@ -66,4 +66,10 @@ describe Site do
|
||||
expect(Site.new(guardian).categories).not_to include(sub_category)
|
||||
end
|
||||
|
||||
it "includes all enabled authentication providers" do
|
||||
SiteSetting.enable_twitter_logins = true
|
||||
SiteSetting.enable_facebook_logins = true
|
||||
expect(Site.new(Guardian.new).auth_providers.map(&:name)).to contain_exactly('facebook', 'twitter')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user