summaryrefslogtreecommitdiff
path: root/spec/lib/api/entities/clusters/agent_spec.rb
blob: 04f7ec28407a9a96c2e1e1cedbfbcd7cd7fad146 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe API::Entities::Clusters::Agent do
  let_it_be(:cluster_agent) { create(:cluster_agent) }

  subject { described_class.new(cluster_agent).as_json }

  it 'includes basic fields' do
    expect(subject).to include(
      id: cluster_agent.id,
      config_project: a_hash_including(id: cluster_agent.project_id)
    )
  end
end