gitlab-org--gitlab-foss/spec/models/clusters/agents/project_authorization_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
509 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Clusters::Agents::ProjectAuthorization do
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
it { is_expected.to belong_to(:project).class_name('Project').required }
it { expect(described_class).to validate_jsonb_schema(['config']) }
describe '#config_project' do
let(:record) { create(:agent_project_authorization) }
it { expect(record.config_project).to eq(record.agent.project) }
end
end