diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb')
-rw-r--r-- | spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb index f72994fcce1..eca8ba1df00 100644 --- a/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb +++ b/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb @@ -23,6 +23,26 @@ RSpec.describe Gitlab::Email::Message::InProductMarketing::Team do expect(message.body_line2).to be_present expect(message.cta_text).to be_present end + + describe '#progress' do + subject { message.progress } + + before do + allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) + end + + context 'on gitlab.com' do + let(:is_gitlab_com) { true } + + it { is_expected.to include("This is email #{series + 2} of 4 in the Team series") } + end + + context 'not on gitlab.com' do + let(:is_gitlab_com) { false } + + it { is_expected.to include("This is email #{series + 2} of 4 in the Team series", Gitlab::Routing.url_helpers.profile_notifications_url) } + end + end end context 'with series 2' do @@ -37,6 +57,26 @@ RSpec.describe Gitlab::Email::Message::InProductMarketing::Team do expect(message.body_line2).to be_present expect(message.cta_text).to be_present end + + describe '#progress' do + subject { message.progress } + + before do + allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) + end + + context 'on gitlab.com' do + let(:is_gitlab_com) { true } + + it { is_expected.to include('This is email 4 of 4 in the Team series') } + end + + context 'not on gitlab.com' do + let(:is_gitlab_com) { false } + + it { is_expected.to include('This is email 4 of 4 in the Team series', Gitlab::Routing.url_helpers.profile_notifications_url) } + end + end end end end |