2021-08-23 05:10:23 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe Clusters::Agents::GroupAuthorization do
|
|
|
|
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
|
|
|
|
it { is_expected.to belong_to(:group).class_name('::Group').required }
|
|
|
|
|
|
|
|
it { expect(described_class).to validate_jsonb_schema(['config']) }
|
2021-10-08 02:11:46 -04:00
|
|
|
|
|
|
|
describe '#config_project' do
|
|
|
|
let(:record) { create(:agent_group_authorization) }
|
|
|
|
|
|
|
|
it { expect(record.config_project).to eq(record.agent.project) }
|
|
|
|
end
|
2021-08-23 05:10:23 -04:00
|
|
|
end
|