adapt spec expectation to changes in b5e9fe0

pull/4862/head
Jens Ulferts 8 years ago
parent a6d265eb79
commit a528bd72a2
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 8
      spec/controllers/work_packages_controller_spec.rb

@ -178,9 +178,11 @@ describe WorkPackagesController, type: :controller do
expect(WorkPackage::Exporter).to receive(:csv).with(work_packages, query) expect(WorkPackage::Exporter).to receive(:csv).with(work_packages, query)
.and_return(mock_csv) .and_return(mock_csv)
expect(controller).to receive(:send_data).with(mock_csv, expect(controller)
type: 'text/csv; charset=utf-8; header=present', .to receive(:send_data)
filename: "#{query.name}.csv") do |_| .with(mock_csv.to_s,
type: 'text/csv; header=present; charset=utf-8;',
disposition: "attachment; filename=#{query.name}.csv") do |_|
# We need to render something because otherwise # We need to render something because otherwise
# the controller will and he will not find a suitable template # the controller will and he will not find a suitable template
controller.render text: 'success' controller.render text: 'success'

Loading…
Cancel
Save