Commit 71af6de4ef928b763948b05c1f75ab099bb61cc2
1 parent
c857b114
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
oauth_client: fix tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/oauth_client/controllers/public/oauth_client_plugin_public_controller.rb
... | ... | @@ -42,7 +42,7 @@ class OauthClientPluginPublicController < PublicController |
42 | 42 | else |
43 | 43 | session[:notice] = _("Can't login with #{provider.name}") |
44 | 44 | end |
45 | - session[:oauth_client_popup] = true if request.env["omniauth.params"]['oauth_client_popup'] | |
45 | + session[:oauth_client_popup] = true if request.env.fetch("omniauth.params", {})['oauth_client_popup'] | |
46 | 46 | session[:return_to] = url_for(:controller => :oauth_client_plugin_public, :action => :finish) |
47 | 47 | |
48 | 48 | redirect_to :controller => :account, :action => :login |
... | ... | @@ -51,7 +51,7 @@ class OauthClientPluginPublicController < PublicController |
51 | 51 | def signup(auth) |
52 | 52 | login = auth.info.email.split('@').first |
53 | 53 | session[:oauth_data] = auth |
54 | - session[:oauth_client_popup] = true if request.env["omniauth.params"]['oauth_client_popup'] | |
54 | + session[:oauth_client_popup] = true if request.env.fetch("omniauth.params", {})['oauth_client_popup'] | |
55 | 55 | session[:return_to] = url_for(:controller => :oauth_client_plugin_public, :action => :finish) |
56 | 56 | name = auth.info.name |
57 | 57 | name ||= auth.extra && auth.extra.raw_info ? auth.extra.raw_info.name : '' | ... | ... |