diff options
Diffstat (limited to 'spec/lib/api')
-rw-r--r-- | spec/lib/api/entities/clusters/agent_authorization_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/api/entities/clusters/agent_authorization_spec.rb b/spec/lib/api/entities/clusters/agent_authorization_spec.rb new file mode 100644 index 00000000000..101a8af4ac4 --- /dev/null +++ b/spec/lib/api/entities/clusters/agent_authorization_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe API::Entities::Clusters::AgentAuthorization do + let_it_be(:authorization) { create(:agent_group_authorization) } + + subject { described_class.new(authorization).as_json } + + it 'includes basic fields' do + expect(subject).to include( + id: authorization.agent_id, + config_project: a_hash_including(id: authorization.agent.project_id), + configuration: authorization.config + ) + end +end |