Skip to content

Commit

Permalink
Merge pull request #1128 from internetee/fix-pdf-invoice-download
Browse files Browse the repository at this point in the history
Fix syntax error
  • Loading branch information
vohmar authored Mar 26, 2019
2 parents 7789ccf + 2a57fb8 commit 4c5d497
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/registrar/invoices/pdf.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
13 changes: 13 additions & 0 deletions test/integration/admin_area/invoices_test.rb
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions test/integration/registrar_area/invoices_test.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4c5d497

Please sign in to comment.