Commit 56b46992 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '300376-follow-up-from-in-product-email-campaigns-saas' into 'master'

Resolve "Follow-up from "In Product Email Campaigns SaaS""

See merge request gitlab-org/gitlab!53033
parents 306e2d8c 83643a99
......@@ -544,9 +544,12 @@ Settings.cron_jobs['schedule_merge_request_cleanup_refs_worker']['job_class'] =
Settings.cron_jobs['manage_evidence_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['manage_evidence_worker']['cron'] ||= '0 * * * *'
Settings.cron_jobs['manage_evidence_worker']['job_class'] = 'Releases::ManageEvidenceWorker'
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['cron'] ||= '0 9 * * *'
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['job_class'] = 'Namespaces::InProductMarketingEmailsWorker'
Gitlab.com do
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['cron'] ||= '0 9 * * *'
Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['job_class'] = 'Namespaces::InProductMarketingEmailsWorker'
end
Gitlab.ee do
Settings.cron_jobs['analytics_devops_adoption_create_all_snapshots_worker'] ||= Settingslogic.new({})
......
......@@ -48,6 +48,10 @@ module Gitlab
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
end
def self.com
yield if com?
end
def self.staging?
Gitlab.config.gitlab.url == STAGING_COM_URL
end
......
......@@ -95,6 +95,26 @@ RSpec.describe Gitlab do
end
end
describe '.com' do
subject { described_class.com { true } }
before do
allow(described_class).to receive(:com?).and_return(gl_com)
end
context 'when on GitLab.com' do
let(:gl_com) { true }
it { is_expected.to be true }
end
context 'when not on GitLab.com' do
let(:gl_com) { false }
it { is_expected.to be_nil }
end
end
describe '.staging?' do
subject { described_class.staging? }
......
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