test/buildmaster/templatelets/tc_href.rb in BuildMaster-0.8.0 vs test/buildmaster/templatelets/tc_href.rb in BuildMaster-0.8.1
- old
+ new
@@ -41,8 +41,15 @@
@template_element.attributes['url'] = 'http://www.google.com'
@target_element = create_element('img')
@href.process(@target_element, @template_element, source('download/download.html'))
assert_equal('http://www.google.com', @target_element.attributes['src'])
end
+
+ def test_should_handle_absolute_path
+ @template_element.attributes['url'] = '/doc.html'
+ @target_element = create_element('img')
+ @href.process(@target_element, @template_element, source('download/download.html'))
+ assert_equal('../doc.html', @target_element.attributes['src'])
+ end
end
-end
\ No newline at end of file
+end