Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fe26fa9e
Commit
fe26fa9e
authored
May 11, 2021
by
Nicolas Dular
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for each email track
parent
52460831
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
0 deletions
+148
-0
spec/lib/gitlab/email/message/in_product_marketing/create_spec.rb
.../gitlab/email/message/in_product_marketing/create_spec.rb
+27
-0
spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb
...ib/gitlab/email/message/in_product_marketing/team_spec.rb
+41
-0
spec/lib/gitlab/email/message/in_product_marketing/trial_spec.rb
...b/gitlab/email/message/in_product_marketing/trial_spec.rb
+27
-0
spec/lib/gitlab/email/message/in_product_marketing/verify_spec.rb
.../gitlab/email/message/in_product_marketing/verify_spec.rb
+53
-0
No files found.
spec/lib/gitlab/email/message/in_product_marketing/create_spec.rb
0 → 100644
View file @
fe26fa9e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Email
::
Message
::
InProductMarketing
::
Create
do
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:group
)
{
build
(
:group
)
}
subject
(
:message
)
{
described_class
.
new
(
group:
group
,
series:
series
)}
describe
"public methods"
do
where
(
series:
[
0
,
1
,
2
])
with_them
do
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_present
expect
(
message
.
cta_text
).
to
be_present
end
end
end
end
spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb
0 → 100644
View file @
fe26fa9e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Email
::
Message
::
InProductMarketing
::
Team
do
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:group
)
{
build
(
:group
)
}
subject
(
:message
)
{
described_class
.
new
(
group:
group
,
series:
series
)}
describe
"public methods"
do
where
(
series:
[
0
,
1
])
with_them
do
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_present
expect
(
message
.
cta_text
).
to
be_present
end
end
context
'with series 2'
do
let
(
:series
)
{
2
}
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_nil
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_present
expect
(
message
.
cta_text
).
to
be_present
end
end
end
end
spec/lib/gitlab/email/message/in_product_marketing/trial_spec.rb
0 → 100644
View file @
fe26fa9e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Email
::
Message
::
InProductMarketing
::
Trial
do
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:group
)
{
build
(
:group
)
}
subject
(
:message
)
{
described_class
.
new
(
group:
group
,
series:
series
)}
describe
"public methods"
do
where
(
series:
[
0
,
1
,
2
])
with_them
do
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_present
expect
(
message
.
cta_text
).
to
be_present
end
end
end
end
spec/lib/gitlab/email/message/in_product_marketing/verify_spec.rb
0 → 100644
View file @
fe26fa9e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Email
::
Message
::
InProductMarketing
::
Verify
do
let_it_be
(
:group
)
{
build
(
:group
)
}
subject
(
:message
)
{
described_class
.
new
(
group:
group
,
series:
series
)}
describe
"public methods"
do
context
'with series 0'
do
let
(
:series
)
{
0
}
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_nil
expect
(
message
.
cta_text
).
to
be_present
end
end
context
'with series 1'
do
let
(
:series
)
{
1
}
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_present
expect
(
message
.
cta_text
).
to
be_present
end
end
context
'with series 2'
do
let
(
:series
)
{
2
}
it
'returns value for series'
,
:aggregate_failures
do
expect
(
message
.
subject_line
).
to
be_present
expect
(
message
.
tagline
).
to
be_present
expect
(
message
.
title
).
to
be_present
expect
(
message
.
subtitle
).
to
be_present
expect
(
message
.
body_line1
).
to
be_present
expect
(
message
.
body_line2
).
to
be_nil
expect
(
message
.
cta_text
).
to
be_present
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment