diff options
| author | Noel Peden <[email protected]> | 2013-04-04 10:29:54 -0700 |
|---|---|---|
| committer | Noel Peden <[email protected]> | 2013-04-04 10:29:54 -0700 |
| commit | e56b36a74fadf2f1c1334ade8388c1e046dcad63 (patch) | |
| tree | c585d77c878b6cd4cbf4eda08bad89bfbbac662b /test/workbook/worksheet/tc_conditional_formatting.rb | |
| parent | 743a56261d5e6db12e816ea6069b29d4b5df01d7 (diff) | |
| download | caxlsx-e56b36a74fadf2f1c1334ade8388c1e046dcad63.tar.gz caxlsx-e56b36a74fadf2f1c1334ade8388c1e046dcad63.zip | |
Added support for specifying between/notBetween formula in an array.
Diffstat (limited to 'test/workbook/worksheet/tc_conditional_formatting.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_conditional_formatting.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb index 087fd40e..42e29fa6 100644 --- a/test/workbook/worksheet/tc_conditional_formatting.rb +++ b/test/workbook/worksheet/tc_conditional_formatting.rb @@ -130,6 +130,13 @@ class TestConditionalFormatting < Test::Unit::TestCase assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='greaterThan']//xmlns:formula='0.5'") end + def test_multiple_formulas + @ws.add_conditional_formatting "B3:B3", { :type => :cellIs, :dxfId => 0, :priority => 1, :operator => :between, :formula => ["1","5"] } + doc = Nokogiri::XML.parse(@ws.to_xml_string) + assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='1'") + assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='5'") + end + def test_sqref assert_raise(ArgumentError) { @cf.sqref = 10 } assert_nothing_raised { @cf.sqref = "A1:A1" } |
