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
3ba65185
Commit
3ba65185
authored
Feb 15, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer using `project.add_developer` in specs
parent
9c37a26c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+3
-3
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+2
-2
spec/services/ci/process_pipeline_service_spec.rb
spec/services/ci/process_pipeline_service_spec.rb
+1
-1
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+2
-2
spec/services/create_deployment_service_spec.rb
spec/services/create_deployment_service_spec.rb
+1
-1
No files found.
spec/models/ci/build_spec.rb
View file @
3ba65185
...
@@ -208,7 +208,7 @@ describe Ci::Build, :models do
...
@@ -208,7 +208,7 @@ describe Ci::Build, :models do
end
end
it
'expects to have retried builds instead the original ones'
do
it
'expects to have retried builds instead the original ones'
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
retried_rspec
=
Ci
::
Build
.
retry
(
rspec_test
,
user
)
retried_rspec
=
Ci
::
Build
.
retry
(
rspec_test
,
user
)
...
@@ -817,7 +817,7 @@ describe Ci::Build, :models do
...
@@ -817,7 +817,7 @@ describe Ci::Build, :models do
subject
{
build
.
other_actions
}
subject
{
build
.
other_actions
}
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
it
'returns other actions'
do
it
'returns other actions'
do
...
@@ -865,7 +865,7 @@ describe Ci::Build, :models do
...
@@ -865,7 +865,7 @@ describe Ci::Build, :models do
let
(
:build
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
)
}
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
context
'when build is manual'
do
context
'when build is manual'
do
...
...
spec/models/ci/pipeline_spec.rb
View file @
3ba65185
...
@@ -563,7 +563,7 @@ describe Ci::Pipeline, models: true do
...
@@ -563,7 +563,7 @@ describe Ci::Pipeline, models: true do
context
'on failure and build retry'
do
context
'on failure and build retry'
do
before
do
before
do
build
.
drop
build
.
drop
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
Ci
::
Build
.
retry
(
build
,
user
)
Ci
::
Build
.
retry
(
build
,
user
)
end
end
...
@@ -776,7 +776,7 @@ describe Ci::Pipeline, models: true do
...
@@ -776,7 +776,7 @@ describe Ci::Pipeline, models: true do
let
(
:latest_status
)
{
pipeline
.
statuses
.
latest
.
pluck
(
:status
)
}
let
(
:latest_status
)
{
pipeline
.
statuses
.
latest
.
pluck
(
:status
)
}
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
context
'when there is a failed build and failed external status'
do
context
'when there is a failed build and failed external status'
do
...
...
spec/services/ci/process_pipeline_service_spec.rb
View file @
3ba65185
...
@@ -9,7 +9,7 @@ describe Ci::ProcessPipelineService, :services do
...
@@ -9,7 +9,7 @@ describe Ci::ProcessPipelineService, :services do
end
end
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
describe
'#execute'
do
describe
'#execute'
do
...
...
spec/services/ci/retry_build_service_spec.rb
View file @
3ba65185
...
@@ -15,7 +15,7 @@ describe Ci::RetryBuildService, :services do
...
@@ -15,7 +15,7 @@ describe Ci::RetryBuildService, :services do
context
'when user has ability to execute build'
do
context
'when user has ability to execute build'
do
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
it
'creates a new build that represents the old one'
do
it
'creates a new build that represents the old one'
do
...
@@ -59,7 +59,7 @@ describe Ci::RetryBuildService, :services do
...
@@ -59,7 +59,7 @@ describe Ci::RetryBuildService, :services do
context
'when user has ability to execute build'
do
context
'when user has ability to execute build'
do
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
it
'creates a new build that represents the old one'
do
it
'creates a new build that represents the old one'
do
...
...
spec/services/create_deployment_service_spec.rb
View file @
3ba65185
...
@@ -235,7 +235,7 @@ describe CreateDeploymentService, services: true do
...
@@ -235,7 +235,7 @@ describe CreateDeploymentService, services: true do
context
'when build is retried'
do
context
'when build is retried'
do
it_behaves_like
'does create environment and deployment'
do
it_behaves_like
'does create environment and deployment'
do
before
do
before
do
project
.
team
<<
[
user
,
:developer
]
project
.
add_developer
(
user
)
end
end
let
(
:deployable
)
{
Ci
::
Build
.
retry
(
build
,
user
)
}
let
(
:deployable
)
{
Ci
::
Build
.
retry
(
build
,
user
)
}
...
...
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