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
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
spec/factories/ci/builds.rb
spec/factories/ci/builds.rb
+1
-0
spec/serializers/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