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
4f548a65
Commit
4f548a65
authored
May 18, 2020
by
andysoiron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add describe blocks to emails_on_push_service_spec
parent
ff0a219a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
spec/models/project_services/emails_on_push_service_spec.rb
spec/models/project_services/emails_on_push_service_spec.rb
+12
-10
No files found.
spec/models/project_services/emails_on_push_service_spec.rb
View file @
4f548a65
...
...
@@ -21,23 +21,25 @@ describe EmailsOnPushService do
end
end
context
'when properties is missing branches_to_be_notified'
do
subject
{
described_class
.
new
(
properties:
{})
}
describe
'.new'
do
context
'when properties is missing branches_to_be_notified'
do
subject
{
described_class
.
new
(
properties:
{})
}
it
'sets the default value to all'
do
expect
(
subject
.
branches_to_be_notified
).
to
eq
(
'all'
)
it
'sets the default value to all'
do
expect
(
subject
.
branches_to_be_notified
).
to
eq
(
'all'
)
end
end
end
context
'when branches_to_be_notified is already set'
do
subject
{
described_class
.
new
(
properties:
{
branches_to_be_notified:
'protected'
})
}
context
'when branches_to_be_notified is already set'
do
subject
{
described_class
.
new
(
properties:
{
branches_to_be_notified:
'protected'
})
}
it
'does not overwrite it with the default value'
do
expect
(
subject
.
branches_to_be_notified
).
to
eq
(
'protected'
)
it
'does not overwrite it with the default value'
do
expect
(
subject
.
branches_to_be_notified
).
to
eq
(
'protected'
)
end
end
end
context
'project emails
'
do
describe
'#execute
'
do
let
(
:push_data
)
{
{
object_kind:
'push'
}
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:service
)
{
create
(
:emails_on_push_service
,
project:
project
)
}
...
...
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