Sha256: e6410dbbdee7388e363c39096054ab52483c7b7e21f8cb34bbaf6f071d4d14d3

Contents?: true

Size: 593 Bytes

Versions: 13

Compression:

Stored size: 593 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

13 entries across 13 versions & 1 rubygems

Version Path
invoice_printer-2.0.0 test/background_test.rb
invoice_printer-2.0.0.beta3 test/background_test.rb
invoice_printer-2.0.0.beta2 test/background_test.rb
invoice_printer-2.0.0.beta1 test/background_test.rb
invoice_printer-2.0.0.alpha1 test/background_test.rb
invoice_printer-1.3.0 test/background_test.rb
invoice_printer-1.2.0 test/background_test.rb
invoice_printer-1.2.0.alpha1 test/background_test.rb
invoice_printer-1.1.0 test/background_test.rb
invoice_printer-1.1.0.rc1 test/background_test.rb
invoice_printer-1.0.0 test/background_test.rb
invoice_printer-1.0.0.rc1 test/background_test.rb
invoice_printer-0.0.9 test/background_test.rb