summaryrefslogtreecommitdiffhomepage
path: root/test/drawing/tc_hyperlink.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/drawing/tc_hyperlink.rb')
-rw-r--r--test/drawing/tc_hyperlink.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/drawing/tc_hyperlink.rb b/test/drawing/tc_hyperlink.rb
index dd27d084..8ae5d01e 100644
--- a/test/drawing/tc_hyperlink.rb
+++ b/test/drawing/tc_hyperlink.rb
@@ -13,49 +13,50 @@ class TestHyperlink < Test::Unit::TestCase
def test_href
assert_nothing_raised { @hyperlink.href = "http://axlsx.blogspot.com" }
- assert_equal(@hyperlink.href, "http://axlsx.blogspot.com")
+ assert_equal("http://axlsx.blogspot.com", @hyperlink.href)
end
def test_tgtFrame
assert_nothing_raised { @hyperlink.tgtFrame = "http://axlsx.blogspot.com" }
- assert_equal(@hyperlink.tgtFrame, "http://axlsx.blogspot.com")
+ assert_equal("http://axlsx.blogspot.com", @hyperlink.tgtFrame)
end
def test_tooltip
assert_nothing_raised { @hyperlink.tooltip = "http://axlsx.blogspot.com" }
- assert_equal(@hyperlink.tooltip, "http://axlsx.blogspot.com")
+ assert_equal("http://axlsx.blogspot.com", @hyperlink.tooltip)
end
def test_invalidUrl
assert_nothing_raised { @hyperlink.invalidUrl = "http://axlsx.blogspot.com" }
- assert_equal(@hyperlink.invalidUrl, "http://axlsx.blogspot.com")
+ assert_equal("http://axlsx.blogspot.com", @hyperlink.invalidUrl)
end
def test_action
assert_nothing_raised { @hyperlink.action = "flee" }
- assert_equal(@hyperlink.action, "flee")
+ assert_equal("flee", @hyperlink.action)
end
def test_endSnd
assert_nothing_raised { @hyperlink.endSnd = "true" }
assert_raise(ArgumentError) { @hyperlink.endSnd = "bob" }
- assert_equal(@hyperlink.endSnd, "true")
+ assert_equal("true", @hyperlink.endSnd)
end
def test_highlightClick
assert_nothing_raised { @hyperlink.highlightClick = false }
assert_raise(ArgumentError) { @hyperlink.highlightClick = "bob" }
- assert_equal(@hyperlink.highlightClick, false)
+ refute(@hyperlink.highlightClick)
end
def test_history
assert_nothing_raised { @hyperlink.history = false }
assert_raise(ArgumentError) { @hyperlink.history = "bob" }
- assert_equal(@hyperlink.history, false)
+ refute(@hyperlink.history)
end
def test_to_xml_string
doc = Nokogiri::XML(@p.workbook.worksheets.first.drawing.to_xml_string)
+
assert(doc.xpath("//a:hlinkClick"))
end
end