BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c9749e22
Commit
c9749e22
authored
Jul 20, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve build details serializable entity specs
parent
02759149
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
builds.rb
spec/factories/ci/builds.rb
+1
-0
build_details_entity_spec.rb
spec/serializers/build_details_entity_spec.rb
+5
-5
No files found.
spec/factories/ci/builds.rb
View file @
c9749e22
...
...
@@ -140,6 +140,7 @@ FactoryGirl.define do
end
trait
:erased
do
erasable
erased_at
Time
.
now
erased_by
factory: :user
end
...
...
spec/serializers/build_details_entity_spec.rb
View file @
c9749e22
...
...
@@ -46,8 +46,8 @@ describe BuildDetailsEntity do
expect
(
subject
).
to
include
(
:new_issue_path
)
end
it
'exposes details of the merge request'
do
expect
(
subject
[
:merge_request
]
).
to
include
(
:iid
,
:path
)
it
'exposes
correct
details of the merge request'
do
expect
(
subject
[
:merge_request
]
[
:iid
]).
to
eq
merge_request
.
iid
end
it
'has a correct merge request path'
do
...
...
@@ -78,7 +78,7 @@ describe BuildDetailsEntity do
end
it
'exposes details of the merge request'
do
expect
(
subject
[
:merge_request
]
).
to
include
(
:iid
,
:path
)
expect
(
subject
[
:merge_request
]
[
:iid
]).
to
eq
merge_request
.
iid
end
it
'has a correct merge request path'
do
...
...
@@ -88,7 +88,7 @@ describe BuildDetailsEntity do
end
context
'when the build has been erased'
do
let
(
:build
)
{
create
(
:ci_build
,
:eras
able
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
:eras
ed
,
project:
project
)
}
it
'exposes the user whom erased the build'
do
expect
(
subject
).
to
include
(
:erase_path
)
...
...
@@ -96,7 +96,7 @@ describe BuildDetailsEntity do
end
context
'when the build has been erased'
do
let
(
:build
)
{
create
(
:ci_build
,
erased_at:
Time
.
now
,
project:
project
,
erased_by:
user
)
}
let
(
:build
)
{
create
(
:ci_build
,
:erased
,
project:
project
,
erased_by:
user
)
}
it
'exposes the user whom erased the build'
do
expect
(
subject
).
to
include
(
:erased_by
)
...
...
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