diff options
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 425096d7e80..08662231fdf 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -3975,64 +3975,6 @@ describe Project do end end - describe '#auto_devops_variables' do - set(:project) { create(:project) } - - subject { project.auto_devops_variables } - - context 'when enabled in instance settings' do - before do - stub_application_setting(auto_devops_enabled: true) - end - - context 'when domain is empty' do - before do - stub_application_setting(auto_devops_domain: nil) - end - - it 'variables does not include AUTO_DEVOPS_DOMAIN' do - is_expected.not_to include(domain_variable) - end - end - - context 'when domain is configured' do - before do - stub_application_setting(auto_devops_domain: 'example.com') - end - - it 'variables includes AUTO_DEVOPS_DOMAIN' do - is_expected.to include(domain_variable) - end - end - end - - context 'when explicitly enabled' do - context 'when domain is empty' do - before do - create(:project_auto_devops, project: project, domain: nil) - end - - it 'variables does not include AUTO_DEVOPS_DOMAIN' do - is_expected.not_to include(domain_variable) - end - end - - context 'when domain is configured' do - before do - create(:project_auto_devops, project: project, domain: 'example.com') - end - - it 'variables includes AUTO_DEVOPS_DOMAIN' do - is_expected.to include(domain_variable) - end - end - end - - def domain_variable - { key: 'AUTO_DEVOPS_DOMAIN', value: 'example.com', public: true } - end - end - describe '#latest_successful_builds_for' do let(:project) { build(:project) } |