mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
- Remove `Que::Mailer` (#895) - Extract controllers - Extract translations - Convert HAML to ERB - Add mailer preview - Improve UI - Remove unused routes - Add tests
19 lines
No EOL
512 B
Ruby
19 lines
No EOL
512 B
Ruby
require 'test_helper'
|
|
|
|
class AdminAreaInvoicesIntegrationTest < ApplicationIntegrationTest
|
|
setup do
|
|
@invoice = invoices(:one)
|
|
sign_in users(:admin)
|
|
end
|
|
|
|
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 |