Sha256: 3251d23c23aaf671492fcda9373acd356d84f009dfd68e5150e0ce258ea790a5

Contents?: true

Size: 685 Bytes

Versions: 2

Compression:

Stored size: 685 Bytes

Contents

require_relative './test_xml_generator'

class TestXmlTimeout < Test::Unit::TestCase
  def test_timeout
    builder = JenkinsJob::Builder.new

    builder.freestyle 'foo' do
      timeout 'elastic' do
        elastic_percentage 200
        elastic_default_timeout 30
      end
    end

    actual = builder.config_as_xml_node('foo')
    { 'timeoutMinutes' => '3', 'failBuild' => 'false', 'writingDescription' => 'false', 'timeoutPercentage' => '200',
     'timeoutMinutesElasticDefault' => '30',  'timeoutType' =>  'elastic' }.each do |k, v|
      assert_equal v, actual.xpath("./project/buildWrappers/hudson.plugins.build__timeout.BuildTimeoutWrapper/#{k}").text, k
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubyjobbuilderdsl-0.0.6 test/test_timeout.rb
rubyjobbuilderdsl-0.0.4 test/test_timeout.rb