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
Léo-Paul Géneau
gitlab-ce
Commits
f5de8f15
Commit
f5de8f15
authored
Feb 05, 2017
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure the right content is served for the build artifacts API
parent
6e1d675d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
spec/requests/api/builds_spec.rb
spec/requests/api/builds_spec.rb
+1
-0
spec/support/matchers/match_file.rb
spec/support/matchers/match_file.rb
+5
-0
No files found.
spec/requests/api/builds_spec.rb
View file @
f5de8f15
...
...
@@ -188,6 +188,7 @@ describe API::Builds, api: true do
it
'returns specific build artifacts'
do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
.
headers
).
to
include
(
download_headers
)
expect
(
response
.
body
).
to
match_file
(
build
.
artifacts_file
.
file
.
file
)
end
end
...
...
spec/support/matchers/match_file.rb
0 → 100644
View file @
f5de8f15
RSpec
::
Matchers
.
define
:match_file
do
|
expected
|
match
do
|
actual
|
expect
(
Digest
::
MD5
.
hexdigest
(
actual
)).
to
eq
(
Digest
::
MD5
.
hexdigest
(
File
.
read
(
expected
)))
end
end
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