diff --git a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/client_spec.rb b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/client_spec.rb index 4b3d528cfb..3047ae6aab 100644 --- a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/client_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/client_spec.rb @@ -29,7 +29,7 @@ end end - describe '.callback' do + describe '.callback', :type => 'unit' do context 'when credentials are valid' do it 'returns a valid JWT token', vcr: 'authenticators/authn-oidc/pkce_support_feature/client_callback-valid_oidc_credentials' do # Because JWT tokens have an expiration timeframe, we need to hold @@ -149,7 +149,7 @@ end end - describe '.discovery_information', vcr: 'authenticators/authn-oidc/pkce_support_feature/discovery_endpoint-valid_oidc_credentials' do + describe '.discovery_information', :type => 'unit', vcr: 'authenticators/authn-oidc/pkce_support_feature/discovery_endpoint-valid_oidc_credentials' do context 'when credentials are valid' do it 'endpoint returns valid data' do discovery_information = client.discovery_information(invalidate: true) diff --git a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/data_objects/authenticator.rb b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/data_objects/authenticator.rb index 47043a57fa..78183be51a 100644 --- a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/data_objects/authenticator.rb +++ b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/data_objects/authenticator.rb @@ -17,7 +17,7 @@ let(:authenticator) { described_class.new(**args) } - describe '.scope' do + describe '.scope', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.scope).to eq('openid email profile') } end @@ -50,7 +50,7 @@ end end - describe '.name' do + describe '.name', :type => 'unit' do context 'when name is missing' do it { expect(authenticator.name).to eq('My Authenticator') } end @@ -60,19 +60,19 @@ end end - describe '.resource_id' do + describe '.resource_id', :type => 'unit' do context 'correctly renders' do it { expect(authenticator.resource_id).to eq('default:webservice:conjur/authn-oidc/my-authenticator') } end end - describe '.response_type' do + describe '.response_type', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.response_type).to eq('code') } end end - describe '.token_ttl' do + describe '.token_ttl', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.token_ttl).to eq(8.minutes) } end diff --git a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/resolve_identity_spec.rb b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/resolve_identity_spec.rb index 83943542fb..bb09e840e2 100644 --- a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/resolve_identity_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/resolve_identity_spec.rb @@ -7,7 +7,7 @@ Authentication::AuthnOidc::PkceSupportFeature::ResolveIdentity.new end - describe('#call') do + describe('#call', :type => 'unit') do let(:valid_role) do instance_double(::Role).tap do |double| allow(double).to receive(:id).and_return('rspec:user:alice') diff --git a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/strategy_rspec.rb b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/strategy_rspec.rb index 62040a41bf..32728f72eb 100644 --- a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/strategy_rspec.rb +++ b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/strategy_rspec.rb @@ -38,7 +38,7 @@ ) end - describe('#callback') do + describe('#callback', :type => 'unit') do context 'when a role_id matches the identity exist' do let(:mapping) { "claim_mapping" } it 'returns the role' do diff --git a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/views/providor_context_spec.rb b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/views/providor_context_spec.rb index 056055561f..3f11fe88a2 100644 --- a/spec/app/domain/authentication/authn-oidc/pkce_support_feature/views/providor_context_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/pkce_support_feature/views/providor_context_spec.rb @@ -91,7 +91,7 @@ end end - describe('#call') do + describe('#call', :type => 'unit') do context 'when provider context is given multiple authenticators' do it 'returns the providers object with the redirect urls' do expect(provider_context.call(authenticators: authenticators)) diff --git a/spec/app/domain/authentication/authn-oidc/v2/client_spec.rb b/spec/app/domain/authentication/authn-oidc/v2/client_spec.rb index 8074da1d01..bf4294fcce 100644 --- a/spec/app/domain/authentication/authn-oidc/v2/client_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/v2/client_spec.rb @@ -23,7 +23,7 @@ ) end - describe '.callback' do + describe '.callback', :type => 'unit' do context 'when credentials are valid' do it 'returns a valid JWT token', vcr: 'authenticators/authn-oidc/v2/client_callback-valid_oidc_credentials' do # Because JWT tokens have an expiration timeframe, we need to hold @@ -99,7 +99,7 @@ end end - describe '.oidc_client' do + describe '.oidc_client', :type => 'unit' do context 'when credentials are valid' do it 'returns a valid oidc client', vcr: 'authenticators/authn-oidc/v2/client_initialization' do oidc_client = client.oidc_client @@ -118,7 +118,7 @@ end end - describe '.discovery_information', vcr: 'authenticators/authn-oidc/v2/discovery_endpoint-valid_oidc_credentials' do + describe '.discovery_information', :type => 'unit', vcr: 'authenticators/authn-oidc/v2/discovery_endpoint-valid_oidc_credentials' do context 'when credentials are valid' do it 'endpoint returns valid data' do discovery_information = client.discovery_information(invalidate: true) diff --git a/spec/app/domain/authentication/authn-oidc/v2/data_objects/authenticator.rb b/spec/app/domain/authentication/authn-oidc/v2/data_objects/authenticator.rb index 01e239b3d1..3d093312f9 100644 --- a/spec/app/domain/authentication/authn-oidc/v2/data_objects/authenticator.rb +++ b/spec/app/domain/authentication/authn-oidc/v2/data_objects/authenticator.rb @@ -19,7 +19,7 @@ let(:authenticator) { described_class.new(**args) } - describe '.scope' do + describe '.scope', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.scope).to eq('openid email profile') } end @@ -47,7 +47,7 @@ end end - describe '.name' do + describe '.name', :type => 'unit' do context 'when name is missing' do it { expect(authenticator.name).to eq('My Authenticator') } end @@ -57,19 +57,19 @@ end end - describe '.resource_id' do + describe '.resource_id', :type => 'unit' do context 'correctly renders' do it { expect(authenticator.resource_id).to eq('default:webservice:conjur/authn-oidc/my-authenticator') } end end - describe '.response_type' do + describe '.response_type', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.response_type).to eq('code') } end end - describe '.token_ttl' do + describe '.token_ttl', :type => 'unit' do context 'with default initializer' do it { expect(authenticator.token_ttl).to eq(8.minutes) } end diff --git a/spec/app/domain/authentication/authn-oidc/v2/resolve_identity_spec.rb b/spec/app/domain/authentication/authn-oidc/v2/resolve_identity_spec.rb index 7ae0515389..68cd88ab90 100644 --- a/spec/app/domain/authentication/authn-oidc/v2/resolve_identity_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/v2/resolve_identity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe(' Authentication::AuthnOidc::V2::ResolveIdentity') do +RSpec.describe('Authentication::AuthnOidc::V2::ResolveIdentity', :type => 'unit') do let(:resolve_identity) do Authentication::AuthnOidc::V2::ResolveIdentity.new end @@ -91,6 +91,5 @@ ) end end - end end diff --git a/spec/app/domain/authentication/authn-oidc/v2/strategy_rspec.rb b/spec/app/domain/authentication/authn-oidc/v2/strategy_rspec.rb index 7ce0cb9d48..1558c63ad4 100644 --- a/spec/app/domain/authentication/authn-oidc/v2/strategy_rspec.rb +++ b/spec/app/domain/authentication/authn-oidc/v2/strategy_rspec.rb @@ -41,7 +41,7 @@ ) end - describe('#callback') do + describe('#callback', :type => 'unit') do context 'when a role_id matches the identity exist' do let(:mapping) { "claim_mapping" } it 'returns the role' do diff --git a/spec/app/domain/authentication/authn-oidc/v2/views/providor_context_spec.rb b/spec/app/domain/authentication/authn-oidc/v2/views/providor_context_spec.rb index 79aafb9436..ce33524e07 100644 --- a/spec/app/domain/authentication/authn-oidc/v2/views/providor_context_spec.rb +++ b/spec/app/domain/authentication/authn-oidc/v2/views/providor_context_spec.rb @@ -68,7 +68,7 @@ ) end - describe('#call') do + describe('#call', :type => 'unit') do context 'when provider context is given multiple authenticators' do it 'returns the providers object with the redirect urls' do expect(provider_context.call(authenticators: authenticators)) @@ -84,4 +84,3 @@ end end end - diff --git a/spec/app/domain/authentication/util/namespace_selector_spec.rb b/spec/app/domain/authentication/util/namespace_selector_spec.rb index a16c2b0e77..8af24f176a 100644 --- a/spec/app/domain/authentication/util/namespace_selector_spec.rb +++ b/spec/app/domain/authentication/util/namespace_selector_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe(Authentication::Util::NamespaceSelector) do - describe '#select' do + describe '#select', :type => 'unit' do context 'when type is a supported authenticator type' do context 'when type is `authn-oidc`' do context 'when pkce support feature flag is enabled' do