test/api_test.rb in invoice_printer-2.0.0 vs test/api_test.rb in invoice_printer-2.1.0.rc1
- old
+ new
@@ -29,11 +29,11 @@
assert !last_response.ok?
assert_equal body, { 'result' => 'error', 'error' => 'Invalid JSON.' }
end
def test_print_with_valid_document
- invoice = InvoicePrinter::Document.new(default_document_params)
+ invoice = InvoicePrinter::Document.new(**default_document_params)
json = {
'document' => invoice.to_h,
'filename' => "#{@test_dir}/test"
}.to_json
@@ -58,10 +58,10 @@
assert !last_response.ok?
assert_equal body, { 'result' => 'error', 'error' => 'Invalid JSON.' }
end
def test_render_with_valid_document
- invoice = InvoicePrinter::Document.new(default_document_params)
+ invoice = InvoicePrinter::Document.new(**default_document_params)
output = InvoicePrinter.render(document: invoice)
json = {
'document' => invoice.to_h
}.to_json
\ No newline at end of file