Commit cad9f4cc authored by Siddharth Asthana's avatar Siddharth Asthana Committed by Peter Leitzen

Fix Style/OpenStructUse offenses in auth provider specs

Changelog: other
parent 12007969
......@@ -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
......
......@@ -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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment