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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
4e4640b1
Commit
4e4640b1
authored
Oct 04, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for new async ci pipeline workers
parent
5ce5abdc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
spec/workers/process_pipeline_worker_spec.rb
spec/workers/process_pipeline_worker_spec.rb
+22
-0
spec/workers/update_pipeline_worker_spec.rb
spec/workers/update_pipeline_worker_spec.rb
+22
-0
No files found.
spec/workers/process_pipeline_worker_spec.rb
0 → 100644
View file @
4e4640b1
require
'spec_helper'
describe
ProcessPipelineWorker
do
describe
'#perform'
do
context
'when pipeline exists'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
it
'processes pipeline'
do
expect_any_instance_of
(
Ci
::
Pipeline
).
to
receive
(
:process!
)
described_class
.
new
.
perform
(
pipeline
.
id
)
end
end
context
'when pipeline does not exist'
do
it
'does not raise exception'
do
expect
{
described_class
.
new
.
perform
(
123
)
}
.
not_to
raise_error
end
end
end
end
spec/workers/update_pipeline_worker_spec.rb
0 → 100644
View file @
4e4640b1
require
'spec_helper'
describe
UpdatePipelineWorker
do
describe
'#perform'
do
context
'when pipeline exists'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
it
'updates pipeline status'
do
expect_any_instance_of
(
Ci
::
Pipeline
).
to
receive
(
:update_status
)
described_class
.
new
.
perform
(
pipeline
.
id
)
end
end
context
'when pipeline does not exist'
do
it
'does not raise exception'
do
expect
{
described_class
.
new
.
perform
(
123
)
}
.
not_to
raise_error
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