Sha256: ddb15f73fb057cdca0f5dc0a2f0c644b35f381bbcc3be707b07917aa92dffc4c
Contents?: true
Size: 968 Bytes
Versions: 21
Compression:
Stored size: 968 Bytes
Contents
require 'test_helper' module PolishInvoicer class WriterTest < Minitest::Test def test_save_to_html invoice = create_valid_invoice writer = Writer.new(invoice) path = '/tmp/test.html' writer.save_to_html(path) assert File.exist?(path) File.unlink(path) end def test_save_to_pdf invoice = create_valid_invoice writer = Writer.new(invoice) path = '/tmp/test.pdf' writer.save_to_pdf(path) assert File.exist?(path) File.unlink(path) end def test_setting_additional_params invoice = create_valid_invoice invoice.template_path = 'tpl.slim' invoice.logger = 'FakeLogger' invoice.wkhtmltopdf_command = 'wkhtmltopdf_fake_command' writer = Writer.new(invoice) assert_equal 'tpl.slim', writer.template_path assert_equal 'FakeLogger', writer.logger assert_equal 'wkhtmltopdf_fake_command', writer.wkhtmltopdf_command end end end
Version data entries
21 entries across 21 versions & 1 rubygems