Sha256: 2839b090d2726151874504efd84d51e1e961352af892386f0f72cb29d0e34576

Contents?: true

Size: 806 Bytes

Versions: 1

Compression:

Stored size: 806 Bytes

Contents

require File.dirname(__FILE__) + '/fields_helper'
require 'pdf_ravager/template'

class TestCheckbox < MiniTest::Unit::TestCase

  def setup
    @checked   = PDFRavager::Fields::Checkbox.new('checkbox1', true,  :true_value => 'foo', :false_value => 'bar')
    @unchecked = PDFRavager::Fields::Checkbox.new('checkbox2', false, :true_value => 'foo', :false_value => 'bar')
  end

  def test_that_custom_checked_acro_form_value_is_set
    assert_equal @checked.acro_form_value, 'foo'
  end

  def test_that_custom_checked_xfa_value_is_set
    assert_equal @checked.xfa_value, 'foo'
  end

  def test_that_custom_unchecked_acro_form_value_is_set
    assert_equal @unchecked.acro_form_value, 'bar'
  end

  def test_that_custom_unchecked_xfa_value_is_set
    assert_equal @unchecked.xfa_value, 'bar'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pdf_ravager-0.1.0 spec/unit/fields/checkbox_spec.rb