diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/requests/groups | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/requests/groups')
-rw-r--r-- | spec/requests/groups/email_campaigns_controller_spec.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/requests/groups/email_campaigns_controller_spec.rb b/spec/requests/groups/email_campaigns_controller_spec.rb index 48297ec4cb6..4d630ef6710 100644 --- a/spec/requests/groups/email_campaigns_controller_spec.rb +++ b/spec/requests/groups/email_campaigns_controller_spec.rb @@ -9,10 +9,11 @@ RSpec.describe Groups::EmailCampaignsController do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, group: group) } let_it_be(:user) { create(:user) } + let(:track) { 'create' } let(:series) { '0' } let(:schema) { described_class::EMAIL_CAMPAIGNS_SCHEMA_URL } - let(:subject_line_text) { Gitlab::Email::Message::InProductMarketing.for(track.to_sym).new(group: group, series: series.to_i).subject_line } + let(:subject_line_text) { Gitlab::Email::Message::InProductMarketing.for(track.to_sym).new(group: group, user: user, series: series.to_i).subject_line } let(:data) do { namespace_id: group.id, @@ -51,7 +52,9 @@ RSpec.describe Groups::EmailCampaignsController do context: [{ schema: described_class::EMAIL_CAMPAIGNS_SCHEMA_URL, data: { namespace_id: group.id, series: series.to_i, subject_line: subject_line_text, track: track.to_s } - }] + }], + user: user, + namespace: group ) end @@ -91,7 +94,7 @@ RSpec.describe Groups::EmailCampaignsController do describe 'track parameter' do context 'when valid' do - where(track: Namespaces::InProductMarketingEmailsService::TRACKS.keys) + where(track: Namespaces::InProductMarketingEmailsService::TRACKS.keys.without(:experience)) with_them do it_behaves_like 'track and redirect' @@ -109,7 +112,7 @@ RSpec.describe Groups::EmailCampaignsController do describe 'series parameter' do context 'when valid' do - where(series: (0..Namespaces::InProductMarketingEmailsService::INTERVAL_DAYS.length - 1).to_a) + where(series: (0..Namespaces::InProductMarketingEmailsService::TRACKS[:create][:interval_days].length - 1).to_a) with_them do it_behaves_like 'track and redirect' @@ -117,7 +120,7 @@ RSpec.describe Groups::EmailCampaignsController do end context 'when invalid' do - where(series: [-1, nil, Namespaces::InProductMarketingEmailsService::INTERVAL_DAYS.length]) + where(series: [-1, nil, Namespaces::InProductMarketingEmailsService::TRACKS[:create][:interval_days].length]) with_them do it_behaves_like 'no track and 404' |