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
ece114e6
Commit
ece114e6
authored
Dec 28, 2015
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update artifacts download specs
parent
5ff7ec42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+8
-8
spec/features/builds_spec.rb
spec/features/builds_spec.rb
+6
-2
No files found.
app/views/projects/builds/show.html.haml
View file @
ece114e6
...
...
@@ -90,14 +90,14 @@
%h1
#{
@build
.
coverage
}
%
-
if
current_user
&&
can?
(
current_user
,
:download_build_artifacts
,
@project
)
&&
@build
.
artifacts?
.build-widget.center
.panel.panel-default
.panel-heading
Build artifacts
.panel-body
.btn-group
{
role: :group
}
=
link_to
"Download"
,
@build
.
artifacts_download_url
,
class:
'btn btn-sm btn-primary'
-
if
@build
.
artifacts_browser_supported?
=
link_to
"Browse"
,
@build
.
artifacts_browse_url
,
class:
'btn btn-sm btn-primary'
.build-widget.artifacts
%h4
.title
Build artifacts
.center
.btn-group
{
role: :group
}
=
link_to
"Download"
,
@build
.
artifacts_download_url
,
class:
'btn btn-sm btn-primary'
-
if
@build
.
artifacts_browser_supported?
=
link_to
"Browse"
,
@build
.
artifacts_browse_url
,
class:
'btn btn-sm btn-primary'
.build-widget
%h4
.title
...
...
spec/features/builds_spec.rb
View file @
ece114e6
...
...
@@ -80,7 +80,11 @@ describe "Builds" do
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
end
it
{
expect
(
page
).
to
have_content
'Download artifacts'
}
it
'has button to download artifacts'
do
page
.
within
(
'.artifacts'
)
do
expect
(
page
).
to
have_content
'Download'
end
end
end
end
...
...
@@ -111,7 +115,7 @@ describe "Builds" do
before
do
@build
.
update_attributes
(
artifacts_file:
artifacts_file
)
visit
namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
)
click_link
'Download artifacts'
page
.
within
(
'.artifacts'
)
{
click_link
'Download'
}
end
it
{
expect
(
page
.
response_headers
[
'Content-Type'
]).
to
eq
(
artifacts_file
.
content_type
)
}
...
...
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