Sha256: a28fd710b71085f097a4a461dbef77981e6e96a39a5b4bb1935d7a3c16f54fce

Contents?: true

Size: 598 Bytes

Versions: 38

Compression:

Stored size: 598 Bytes

Contents

require 'tc_helper.rb'

class TestCellProtection < Test::Unit::TestCase

  def setup
    @item = Axlsx::CellProtection.new
  end

  def teardown
  end

  def test_initialiation
    assert_equal(@item.hidden, nil)
    assert_equal(@item.locked, nil)
  end

  def test_hidden
    assert_raise(ArgumentError) { @item.hidden = -1 }
    assert_nothing_raised { @item.hidden = false }
    assert_equal(@item.hidden, false )
  end

  def test_locked
    assert_raise(ArgumentError) { @item.locked = -1 }
    assert_nothing_raised { @item.locked = false }
    assert_equal(@item.locked, false )
  end

end

Version data entries

38 entries across 38 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/stylesheet/tc_cell_protection.rb
caxlsx-3.1.0 test/stylesheet/tc_cell_protection.rb
bonio-axlsx-2.2.3 test/stylesheet/tc_cell_protection.rb
caxlsx-3.0.4 test/stylesheet/tc_cell_protection.rb
caxlsx-3.0.3 test/stylesheet/tc_cell_protection.rb
caxlsx-3.0.2 test/stylesheet/tc_cell_protection.rb
caxlsx-2.0.2 test/stylesheet/tc_cell_protection.rb
caxlsx-3.0.1 test/stylesheet/tc_cell_protection.rb
caxlsx-3.0.0 test/stylesheet/tc_cell_protection.rb
axlsx-alt-3.0.1 test/stylesheet/tc_cell_protection.rb
axlsx-alt-3.0.0 test/stylesheet/tc_cell_protection.rb
axlsx-3.0.0.pre test/stylesheet/tc_cell_protection.rb
bonio-axlsx-2.2.2 test/stylesheet/tc_cell_protection.rb
bonio-axlsx-2.2.1 test/stylesheet/tc_cell_protection.rb
dg-axlsx-2.1.0 test/stylesheet/tc_cell_protection.rb
axlsx-2.1.0.pre test/stylesheet/tc_cell_protection.rb
l_axlsx-2.0.1 test/stylesheet/tc_cell_protection.rb
axlsx-2.0.1 test/stylesheet/tc_cell_protection.rb
axlsx-2.0.0 test/stylesheet/tc_cell_protection.rb
axlsx-1.3.6 test/stylesheet/tc_cell_protection.rb