Sha256: f2f4fe2aa71c69dd3a4b8a7f13fe49f1b9cd8c585871a9b256cbd6ec03ee9c95

Contents?: true

Size: 595 Bytes

Versions: 6

Compression:

Stored size: 595 Bytes

Contents

require 'test_helper'

class BackgroundTest < Minitest::Test
  include InvoicePrinterHelpers

  def setup
    @invoice = InvoicePrinter::Document.new(**default_document_params)
  end

  def test_background_render
    InvoicePrinter.render(document: @invoice, background: './examples/background.png')
    InvoicePrinter.render(document: @invoice, background: nil)
    InvoicePrinter.render(document: @invoice)
  end

  def test_missing_background_raises_an_exception
    assert_raises(ArgumentError) do
      InvoicePrinter.render(document: @invoice, background: 'missing.jpg')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
invoice_printer-2.4.0 test/background_test.rb
invoice_printer-2.3.0 test/background_test.rb
invoice_printer-2.2.0 test/background_test.rb
invoice_printer-2.2.0.alpha1 test/background_test.rb
invoice_printer-2.1.0 test/background_test.rb
invoice_printer-2.1.0.rc1 test/background_test.rb