Sha256: 97551c5a7470df4e4fe674faa709254c8121c433b1d869c08d22f2fd65205703

Contents?: true

Size: 618 Bytes

Versions: 18

Compression:

Stored size: 618 Bytes

Contents

require 'test/unit'
require 'axlsx.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

18 entries across 18 versions & 1 rubygems

Version Path
axlsx-1.0.18 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.17 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.16 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.15 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.14 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.12 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.11 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.10 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.10a test/stylesheet/tc_cell_protection.rb
axlsx-1.0.9 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.8 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.7 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.6 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.5 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.4 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.3 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.1 test/stylesheet/tc_cell_protection.rb
axlsx-1.0.0 test/stylesheet/tc_cell_protection.rb