Commit e06037cf authored by James Edwards-Jones's avatar James Edwards-Jones

Added CSV download button to issues#index

parent 7538ae81
......@@ -21,6 +21,8 @@
- if current_user
= link_to url_for(params.merge(format: :atom, private_token: current_user.private_token)), class: 'btn append-right-10 has-tooltip', title: 'Subscribe' do
= icon('rss')
= link_to namespace_project_issues_path(@project.namespace, @project, :csv), class: 'btn append-right-10 has-tooltip', title: 'Download CSV' do
= icon('download')
- if can? current_user, :create_issue, @project
= link_to new_namespace_project_issue_path(@project.namespace,
@project,
......
......@@ -10,7 +10,9 @@ describe 'Issues csv', feature: true do
visit namespace_project_issues_path(project.namespace, project, format: :csv)
end
it 'downloads as a file' do
it "downloads from a project's issue index" do
visit namespace_project_issues_path(project.namespace, project)
click_on 'Download CSV'
expect(page.response_headers['Content-Type']).to include('csv')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment