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
78d05914
Commit
78d05914
authored
May 04, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more examples for testing SQL
parent
b8715643
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
spec/services/projects/propagate_service_spec.rb
spec/services/projects/propagate_service_spec.rb
+30
-0
No files found.
spec/services/projects/propagate_service_spec.rb
View file @
78d05914
...
@@ -22,8 +22,38 @@ describe Projects::PropagateService, services: true do
...
@@ -22,8 +22,38 @@ describe Projects::PropagateService, services: true do
to
change
{
Service
.
count
}.
by
(
1
)
to
change
{
Service
.
count
}.
by
(
1
)
end
end
it
'creates services for a project that has another service'
do
other_service
=
BambooService
.
create
(
template:
true
,
active:
true
,
properties:
{
bamboo_url:
'http://gitlab.com'
,
username:
'mic'
,
password:
"password"
,
build_key:
'build'
}
)
Service
.
build_from_template
(
project
.
id
,
other_service
).
save!
expect
{
described_class
.
propagate!
(
service_template
)
}.
to
change
{
Service
.
count
}.
by
(
1
)
end
it
'does not create the service if it exists already'
do
it
'does not create the service if it exists already'
do
other_service
=
BambooService
.
create
(
template:
true
,
active:
true
,
properties:
{
bamboo_url:
'http://gitlab.com'
,
username:
'mic'
,
password:
"password"
,
build_key:
'build'
}
)
Service
.
build_from_template
(
project
.
id
,
service_template
).
save!
Service
.
build_from_template
(
project
.
id
,
service_template
).
save!
Service
.
build_from_template
(
project
.
id
,
other_service
).
save!
expect
{
described_class
.
propagate!
(
service_template
)
}.
expect
{
described_class
.
propagate!
(
service_template
)
}.
not_to
change
{
Service
.
count
}
not_to
change
{
Service
.
count
}
...
...
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