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
cad9f4cc
Commit
cad9f4cc
authored
Feb 18, 2022
by
Siddharth Asthana
Committed by
Peter Leitzen
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Style/OpenStructUse offenses in auth provider specs
Changelog: other
parent
12007969
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
.rubocop_todo/style/open_struct_use.yml
.rubocop_todo/style/open_struct_use.yml
+0
-1
spec/lib/gitlab/auth/o_auth/provider_spec.rb
spec/lib/gitlab/auth/o_auth/provider_spec.rb
+4
-4
No files found.
.rubocop_todo/style/open_struct_use.yml
View file @
cad9f4cc
...
...
@@ -21,7 +21,6 @@ Style/OpenStructUse:
-
spec/graphql/mutations/commits/create_spec.rb
-
spec/helpers/application_settings_helper_spec.rb
-
spec/helpers/profiles_helper_spec.rb
-
spec/lib/gitlab/auth/o_auth/provider_spec.rb
-
spec/lib/gitlab/gitaly_client/blobs_stitcher_spec.rb
-
spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb
-
spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
...
...
spec/lib/gitlab/auth/o_auth/provider_spec.rb
View file @
cad9f4cc
...
...
@@ -62,7 +62,7 @@ RSpec.describe Gitlab::Auth::OAuth::Provider do
context
'for an OmniAuth provider'
do
before
do
provider
=
OpenStruct
.
new
(
provider
=
ActiveSupport
::
InheritableOptions
.
new
(
name:
'google_oauth2'
,
app_id:
'asd123'
,
app_secret:
'asd123'
...
...
@@ -74,7 +74,7 @@ RSpec.describe Gitlab::Auth::OAuth::Provider do
subject
{
described_class
.
config_for
(
'google_oauth2'
)
}
it
'returns the config'
do
expect
(
subject
).
to
be_a
(
OpenStruct
)
expect
(
subject
).
to
be_a
(
ActiveSupport
::
InheritableOptions
)
end
it
'merges defaults with the given configuration'
do
...
...
@@ -98,7 +98,7 @@ RSpec.describe Gitlab::Auth::OAuth::Provider do
context
'when configuration specifies a custom label'
do
let
(
:name
)
{
'google_oauth2'
}
let
(
:label
)
{
'Custom Google Provider'
}
let
(
:provider
)
{
OpenStruct
.
new
({
'name'
=>
name
,
'label'
=>
label
}
)
}
let
(
:provider
)
{
ActiveSupport
::
InheritableOptions
.
new
(
name:
name
,
label:
label
)
}
before
do
stub_omniauth_setting
(
providers:
[
provider
])
...
...
@@ -110,7 +110,7 @@ RSpec.describe Gitlab::Auth::OAuth::Provider do
end
context
'when configuration does not specify a custom label'
do
let
(
:provider
)
{
OpenStruct
.
new
({
'name'
=>
name
}
)
}
let
(
:provider
)
{
ActiveSupport
::
InheritableOptions
.
new
(
name:
name
)
}
before
do
stub_omniauth_setting
(
providers:
[
provider
])
...
...
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