summaryrefslogtreecommitdiff
path: root/spec/models/users
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/models/users
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/models/users')
-rw-r--r--spec/models/users/in_product_marketing_email_spec.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/models/users/in_product_marketing_email_spec.rb b/spec/models/users/in_product_marketing_email_spec.rb
index cf08cf7ceed..ca03c3e645d 100644
--- a/spec/models/users/in_product_marketing_email_spec.rb
+++ b/spec/models/users/in_product_marketing_email_spec.rb
@@ -19,13 +19,6 @@ RSpec.describe Users::InProductMarketingEmail, type: :model do
it { is_expected.to validate_uniqueness_of(:user_id).scoped_to([:track, :series]).with_message('has already been sent') }
end
- describe '.tracks' do
- it 'has an entry for every track' do
- tracks = [Namespaces::InviteTeamEmailService::TRACK, Namespaces::InProductMarketingEmailsService::TRACKS.keys].flatten
- expect(tracks).to match_array(described_class.tracks.keys.map(&:to_sym))
- end
- end
-
describe '.without_track_and_series' do
let_it_be(:user) { create(:user) }
@@ -135,4 +128,15 @@ RSpec.describe Users::InProductMarketingEmail, type: :model do
end
end
end
+
+ describe '.ACTIVE_TRACKS' do
+ it 'has an entry for every track' do
+ tracks = Namespaces::InProductMarketingEmailsService::TRACKS.keys
+ expect(tracks).to match_array(described_class::ACTIVE_TRACKS.keys.map(&:to_sym))
+ end
+
+ it 'does not include INACTIVE_TRACK_NAMES' do
+ expect(described_class::ACTIVE_TRACKS.keys).not_to include(*described_class::INACTIVE_TRACK_NAMES)
+ end
+ end
end