Add test of default CI management to PomCustomizerTest
@@ -221,6 +221,39 @@ class PomCustomizerTest extends Specification {
"""
}
+ def "default CI management"() {
+ conf.gitHub.repository = "repo"
+
+ PomCustomizer.customizePom(node, conf, "foo", "Foo library", new DefaultProjectContributorsSet())
+
+ expect:
+ printXml(node) == """<project>
+ <name>foo</name>
+ <packaging>jar</packaging>
+ <url>https://github.com/repo</url>
+ <description>Foo library</description>
+ <licenses>
+ <license>
+ <name>The MIT License</name>
+ <url>https://github.com/repo/blob/master/LICENSE</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>https://github.com/repo.git</url>
+ </scm>
+ <issueManagement>
+ <url>https://github.com/repo/issues</url>
+ <system>GitHub issues</system>
+ </issueManagement>
+ <ciManagement>
+ <url>https://travis-ci.org/repo</url>
+ <system>TravisCI</system>
+ </ciManagement>
+</project>
+"""
+ }
+
private static String printXml(Node node) {
def sw = new StringWriter()
def printer = new XmlNodePrinter(new PrintWriter(sw))
