Merge pull request #1128 from internetee/fix-pdf-invoice-download

Fix syntax error
This commit is contained in:
Timo Võhmar 2019-03-26 11:11:03 +02:00 committed by GitHub
commit 4c5d4979f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 1 deletions

View file

@ -153,7 +153,7 @@
- if @invoice.cancelled?
%dt= Invoice.human_attribute_name :cancelled_at
%dd= l @invoice.cancelled_at,
%dd= l @invoice.cancelled_at
%dt= t(:due_date)
- if @invoice.cancelled?

View file

@ -0,0 +1,13 @@
require 'test_helper'
class AdminAreaInvoicesIntegrationTest < ApplicationIntegrationTest
setup do
@invoice = invoices(:one)
sign_in users(:admin)
end
def test_download_invoice_pdf
get admin_invoice_download_pdf_path(@invoice)
assert_response :ok
end
end

View file

@ -0,0 +1,13 @@
require 'test_helper'
class RegistrarAreaInvoicesIntegrationTest < ApplicationIntegrationTest
setup do
@invoice = invoices(:one)
sign_in users(:api_bestnames)
end
def test_download_invoice_pdf
get download_pdf_registrar_invoice_path(@invoice)
assert_response :ok
end
end