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
c9707025
Commit
c9707025
authored
May 31, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix job play service specs related to protected actions
parent
13f10a96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
spec/services/ci/play_build_service_spec.rb
spec/services/ci/play_build_service_spec.rb
+13
-4
No files found.
spec/services/ci/play_build_service_spec.rb
View file @
c9707025
...
@@ -13,8 +13,11 @@ describe Ci::PlayBuildService, '#execute', :services do
...
@@ -13,8 +13,11 @@ describe Ci::PlayBuildService, '#execute', :services do
context
'when project does not have repository yet'
do
context
'when project does not have repository yet'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:project
)
{
create
(
:empty_project
)
}
it
'allows user with master role to play build'
do
it
'allows user to play build if protected branch rules are met'
do
project
.
add_master
(
user
)
project
.
add_developer
(
user
)
create
(
:protected_branch
,
:developers_can_merge
,
name:
build
.
ref
,
project:
project
)
service
.
execute
(
build
)
service
.
execute
(
build
)
...
@@ -45,7 +48,10 @@ describe Ci::PlayBuildService, '#execute', :services do
...
@@ -45,7 +48,10 @@ describe Ci::PlayBuildService, '#execute', :services do
let
(
:build
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
)
}
before
do
before
do
project
.
add_master
(
user
)
project
.
add_developer
(
user
)
create
(
:protected_branch
,
:developers_can_merge
,
name:
build
.
ref
,
project:
project
)
end
end
it
'enqueues the build'
do
it
'enqueues the build'
do
...
@@ -64,7 +70,10 @@ describe Ci::PlayBuildService, '#execute', :services do
...
@@ -64,7 +70,10 @@ describe Ci::PlayBuildService, '#execute', :services do
let
(
:build
)
{
create
(
:ci_build
,
when: :manual
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
when: :manual
,
pipeline:
pipeline
)
}
before
do
before
do
project
.
add_master
(
user
)
project
.
add_developer
(
user
)
create
(
:protected_branch
,
:developers_can_merge
,
name:
build
.
ref
,
project:
project
)
end
end
it
'duplicates the build'
do
it
'duplicates the build'
do
...
...
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