diff options
Diffstat (limited to 'test/workbook/worksheet/tc_sheet_protection.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_sheet_protection.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/workbook/worksheet/tc_sheet_protection.rb b/test/workbook/worksheet/tc_sheet_protection.rb index 0595d2ec..6ca5dafd 100644 --- a/test/workbook/worksheet/tc_sheet_protection.rb +++ b/test/workbook/worksheet/tc_sheet_protection.rb @@ -20,7 +20,7 @@ require 'tc_helper.rb' # <xsd:attribute name="selectUnlockedCells" type="xsd:boolean" use="optional" default=0/> # <xsd:attribute name="password" type="xsd:string" use="optional" default="nil"/> # </xsd:complexType> - + class TestSheetProtection < Test::Unit::TestCase def setup #inverse defaults @@ -30,9 +30,9 @@ class TestSheetProtection < Test::Unit::TestCase :sort => false, :auto_filter => false, :pivot_tables => false, :select_unlocked_cells => true } @string_options = { :password => nil } - + @options = @boolean_options.merge(@string_options) - + @sp = Axlsx::SheetProtection.new(@options) end @@ -56,7 +56,7 @@ class TestSheetProtection < Test::Unit::TestCase @sp.password = 'fish' # -> CA3F doc = Nokogiri::XML(@sp.to_xml_string) @options.each do |key, value| - assert(doc.xpath("//sheetProtection[@#{key.to_s.gsub(/_(.)/){ $1.upcase }}='#{value}']")) + assert(doc.xpath("//sheetProtection[@#{key.to_s.gsub(/_(.)/){ $1.upcase }}='#{value}']")) end end |
