diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-29 18:07:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-29 18:07:02 +0300 |
commit | a466e9450d5949aa762913729918db02b5d27761 (patch) | |
tree | 8edfaac5434413a7fe160a6e50dfaee8ecf0f151 /spec/lib/api | |
parent | d1d4dfb74a55a1b56b9451b2a844c57e05c9557f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/api')
-rw-r--r-- | spec/lib/api/ci/helpers/runner_helpers_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/entities/ssh_key_spec.rb | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/spec/lib/api/ci/helpers/runner_helpers_spec.rb b/spec/lib/api/ci/helpers/runner_helpers_spec.rb index b254c419cbc..d32f7e4f0be 100644 --- a/spec/lib/api/ci/helpers/runner_helpers_spec.rb +++ b/spec/lib/api/ci/helpers/runner_helpers_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Helpers::Runner do +RSpec.describe API::Ci::Helpers::Runner, feature_category: :runner do let(:ip_address) { '1.2.3.4' } let(:runner_class) do Class.new do diff --git a/spec/lib/api/entities/ssh_key_spec.rb b/spec/lib/api/entities/ssh_key_spec.rb index 768ad416fbe..9d0acf69274 100644 --- a/spec/lib/api/entities/ssh_key_spec.rb +++ b/spec/lib/api/entities/ssh_key_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Entities::SSHKey do +RSpec.describe API::Entities::SSHKey, feature_category: :authentication_and_authorization do describe '#as_json' do subject { entity.as_json } @@ -15,8 +15,19 @@ RSpec.describe API::Entities::SSHKey do title: key.title, created_at: key.created_at, expires_at: key.expires_at, - key: key.publishable_key + key: key.publishable_key, + usage_type: 'auth_and_signing' ) end + + context 'when ssh_key_usage_types is disabled' do + before do + stub_feature_flags(ssh_key_usage_types: false) + end + + it 'does not include usage type field' do + expect(subject.keys).not_to include(:usage_type) + end + end end end |