mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Refactor invoice PDF generation, download and delivery
- Remove `Que::Mailer` (#895) - Extract controllers - Extract translations - Convert HAML to ERB - Add mailer preview - Improve UI - Remove unused routes - Add tests
This commit is contained in:
parent
7e0fd30125
commit
27ea790b28
30 changed files with 288 additions and 138 deletions
|
@ -6,8 +6,14 @@ class AdminAreaInvoicesIntegrationTest < ApplicationIntegrationTest
|
|||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def test_download_invoice_pdf
|
||||
get admin_invoice_download_pdf_path(@invoice)
|
||||
def test_downloads_invoice
|
||||
assert_equal 1, @invoice.number
|
||||
|
||||
get download_admin_invoice_path(@invoice)
|
||||
|
||||
assert_response :ok
|
||||
assert_equal 'application/pdf', response.headers['Content-Type']
|
||||
assert_equal 'attachment; filename="invoice-1.pdf"', response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue