test/buildmaster/site/tc_template_builder.rb in BuildMaster-0.8.0 vs test/buildmaster/site/tc_template_builder.rb in BuildMaster-0.8.1

- old
+ new

@@ -75,10 +75,18 @@ releases.stable_version = '0.6' releases.pre_release_version = '0.7' releases.snap_shot_version = 'n/a' releases.download_link = 'download.html' releases.versioning_link = 'versioning.html' - builder.generate + document = builder.generate + assert_equal('Latest Versions', REXML::XPath.first(document, '/html/body/template:when/div[@class="right"]/div/h1').text) + end + + def test_should_have_no_release_info_if_not_assigned + builder = TemplateBuilder.new + builder.releases.download_link = nil + document = builder.generate + assert_equal(0, REXML::XPath.match(document, '/html/body/template:when/div/*').size) end def test_should_read_from_yaml content = <<CONTENT title_header: BuilderMaster -