Sha256: 63fed6bda3da651ae2b6f1176255f105d372e97b8a81082e011cde5db7afe88b

Contents?: true

Size: 813 Bytes

Versions: 5

Compression:

Stored size: 813 Bytes

Contents

require_relative './test_xml_generator'

class TestXmlArtifactory < Test::Unit::TestCase
  def test_artifactory
    builder = JenkinsJob::Builder.new

    builder.freestyle 'foo' do
      artifactory do
        server 'artifactory.mycompany.com'
        repository 'bar'
        deploy '*.gz'
      end
    end

    actual = builder.config_as_xml_node('foo')
    { 'details/artifactoryName' => 'artifactory.mycompany.com',
      'details/repositoryKey' => 'bar',
      'details/snapshotsRepositoryKey' => 'bar',
      'deployPattern' => '*.gz',
      'deployBuildInfo' => 'false',
      'includeEnvVars' => 'false',
     }.each do |k, v|
      assert_equal v, actual.xpath("./project/buildWrappers/org.jfrog.hudson.generic.ArtifactoryGenericConfigurator/#{k}").text, k
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubyjobbuilderdsl-0.0.5 test/test_artifactory.rb
rubyjobbuilderdsl-0.0.3 test/test_artifactory.rb
rubyjobbuilderdsl-0.0.2 test/test_artifactory.rb
rubyjobbuilderdsl-0.0.1 test/test_artifactory.rb
rubyjobbuilderdsl-0.0.0 test/test_artifactory.rb