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
Boxiang Sun
gitlab-ce
Commits
f203ca5c
Commit
f203ca5c
authored
Nov 03, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs related to deployments and environments
parent
3c3e61aa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
app/serializers/build_entity.rb
app/serializers/build_entity.rb
+1
-1
spec/factories/deployments.rb
spec/factories/deployments.rb
+2
-2
spec/serializers/environment_serializer_spec.rb
spec/serializers/environment_serializer_spec.rb
+4
-2
No files found.
app/serializers/build_entity.rb
View file @
f203ca5c
...
...
@@ -13,7 +13,7 @@ class BuildEntity < Grape::Entity
end
expose
:play_url
,
if:
->
(
build
,
_
)
{
build
.
manual?
}
do
|
build
|
url_to
(
:
retr
y_namespace_project_build
,
build
)
url_to
(
:
pla
y_namespace_project_build
,
build
)
end
private
...
...
spec/factories/deployments.rb
View file @
f203ca5c
FactoryGirl
.
define
do
factory
:deployment
,
class:
Deployment
do
sha
'
b83d6e391c22777fca1ed3012fce84f633d7fed0
'
sha
'
97de212e80737a608d939f648d959671fb0a0142
'
ref
'master'
tag
false
project
project
nil
environment
factory: :environment
...
...
spec/serializers/environment_serializer_spec.rb
View file @
f203ca5c
...
...
@@ -8,6 +8,7 @@ describe EnvironmentSerializer do
end
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
context
'when there is a single object provided'
do
before
do
...
...
@@ -17,11 +18,12 @@ describe EnvironmentSerializer do
let
(
:deployment
)
do
create
(
:deployment
,
deployable:
deployable
,
user:
user
)
user:
user
,
project:
project
,
sha:
project
.
commit
.
id
)
end
let
(
:deployable
)
{
create
(
:ci_build
)
}
let
(
:project
)
{
deployment
.
project
}
let
(
:resource
)
{
deployment
.
environment
}
it
'it generates payload for single object'
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