Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
438b38dc
Commit
438b38dc
authored
Nov 30, 2020
by
Vasilii Iakliushin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix kwargs deprecation warnings
Contributes to
https://gitlab.com/gitlab-org/gitlab/-/issues/258994
parent
0974d0a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
spec/controllers/omniauth_callbacks_controller_spec.rb
spec/controllers/omniauth_callbacks_controller_spec.rb
+2
-2
spec/support/helpers/login_helpers.rb
spec/support/helpers/login_helpers.rb
+1
-1
No files found.
spec/controllers/omniauth_callbacks_controller_spec.rb
View file @
438b38dc
...
@@ -367,8 +367,8 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
...
@@ -367,8 +367,8 @@ RSpec.describe OmniauthCallbacksController, type: :controller do
before
do
before
do
stub_last_request_id
(
last_request_id
)
stub_last_request_id
(
last_request_id
)
stub_omniauth_saml_config
(
{
enabled:
true
,
auto_link_saml_user:
true
,
allow_single_sign_on:
[
'saml'
],
stub_omniauth_saml_config
(
enabled:
true
,
auto_link_saml_user:
true
,
allow_single_sign_on:
[
'saml'
],
providers:
[
saml_config
]
}
)
providers:
[
saml_config
])
mock_auth_hash_with_saml_xml
(
'saml'
,
+
'my-uid'
,
user
.
email
,
mock_saml_response
)
mock_auth_hash_with_saml_xml
(
'saml'
,
+
'my-uid'
,
user
.
email
,
mock_saml_response
)
request
.
env
[
'devise.mapping'
]
=
Devise
.
mappings
[
:user
]
request
.
env
[
'devise.mapping'
]
=
Devise
.
mappings
[
:user
]
request
.
env
[
'omniauth.auth'
]
=
Rails
.
application
.
env_config
[
'omniauth.auth'
]
request
.
env
[
'omniauth.auth'
]
=
Rails
.
application
.
env_config
[
'omniauth.auth'
]
...
...
spec/support/helpers/login_helpers.rb
View file @
438b38dc
...
@@ -198,7 +198,7 @@ module LoginHelpers
...
@@ -198,7 +198,7 @@ module LoginHelpers
env
[
'omniauth.error.strategy'
]
=
strategy
env
[
'omniauth.error.strategy'
]
=
strategy
end
end
def
stub_omniauth_saml_config
(
messages
,
context:
Rails
.
application
)
def
stub_omniauth_saml_config
(
context:
Rails
.
application
,
**
messages
)
set_devise_mapping
(
context:
context
)
set_devise_mapping
(
context:
context
)
routes
=
Rails
.
application
.
routes
routes
=
Rails
.
application
.
routes
routes
.
disable_clear_and_finalize
=
true
routes
.
disable_clear_and_finalize
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment