Commit d4322db9 authored by Mark Lapierre's avatar Mark Lapierre Committed by Nikola Milojevic

Skip attributes defined in EE code

parent 3d378065
......@@ -658,7 +658,16 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to delegate_method(:container_registry_enabled?).to(:project_feature) }
it { is_expected.to delegate_method(:container_registry_access_level).to(:project_feature) }
include_examples 'ci_cd_settings delegation'
include_examples 'ci_cd_settings delegation' do
# Skip attributes defined in EE code
let(:exclude_attributes) do
%w(
merge_pipelines_enabled
merge_trains_enabled
auto_rollback_enabled
)
end
end
describe '#ci_forward_deployment_enabled?' do
it_behaves_like 'a ci_cd_settings predicate method', prefix: 'ci_' do
......
......@@ -4,7 +4,7 @@ RSpec.shared_examples 'ci_cd_settings delegation' do
context 'when ci_cd_settings is destroyed but project is not' do
it 'allows methods delegated to ci_cd_settings to be nil', :aggregate_failures do
project = create(:project)
attributes = project.ci_cd_settings.attributes.keys - %w(id project_id)
attributes = project.ci_cd_settings.attributes.keys - %w(id project_id) - exclude_attributes
project.ci_cd_settings.destroy
project.reload
attributes.each do |attr|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment