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
3420c0f7
Commit
3420c0f7
authored
Sep 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix post receive specs regarding pipeline creation
parent
9776dbda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
spec/workers/post_receive_spec.rb
spec/workers/post_receive_spec.rb
+8
-5
No files found.
spec/workers/post_receive_spec.rb
View file @
3420c0f7
...
@@ -70,12 +70,15 @@ describe PostReceive do
...
@@ -70,12 +70,15 @@ describe PostReceive do
context
"creates a Ci::Pipeline for every change"
do
context
"creates a Ci::Pipeline for every change"
do
before
do
before
do
allow_any_instance_of
(
Ci
::
CreatePipelineService
).
to
receive
(
:commit
)
do
OpenStruct
.
new
(
id:
'123456'
)
end
allow_any_instance_of
(
Ci
::
CreatePipelineService
).
to
receive
(
:branch?
).
and_return
(
true
)
allow_any_instance_of
(
Repository
).
to
receive
(
:ref_exists?
).
and_return
(
true
)
stub_ci_pipeline_to_return_yaml_file
stub_ci_pipeline_to_return_yaml_file
# TODO, don't stub private methods
#
allow_any_instance_of
(
Ci
::
CreatePipelineService
)
.
to
receive
(
:commit
).
and_return
(
OpenStruct
.
new
(
id:
'123456'
))
allow_any_instance_of
(
Repository
)
.
to
receive
(
:branch_exists?
).
and_return
(
true
)
end
end
it
{
expect
{
subject
}.
to
change
{
Ci
::
Pipeline
.
count
}.
by
(
2
)
}
it
{
expect
{
subject
}.
to
change
{
Ci
::
Pipeline
.
count
}.
by
(
2
)
}
...
...
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