diff --git a/src/main/webapp/help/globalConfig/buildForTesting.html b/src/main/webapp/help/globalConfig/buildForTesting.html
new file mode 100644
index 0000000..017db19
--- /dev/null
+++ b/src/main/webapp/help/globalConfig/buildForTesting.html
@@ -0,0 +1,3 @@
+
+ Specifies the build used by the Test Against Build button. Example: common/12
+
diff --git a/src/main/webapp/help/globalConfig/defaultCharset.html b/src/main/webapp/help/globalConfig/defaultCharset.html
new file mode 100644
index 0000000..9f73c3c
--- /dev/null
+++ b/src/main/webapp/help/globalConfig/defaultCharset.html
@@ -0,0 +1,4 @@
+
+ The default charset of the emails sent after a build.
+ If this is set to "default", then it uses UTF-8.
+
diff --git a/src/main/webapp/help/globalConfig/defaultIsScript.html b/src/main/webapp/help/globalConfig/defaultIsScript.html
new file mode 100644
index 0000000..45ba123
--- /dev/null
+++ b/src/main/webapp/help/globalConfig/defaultIsScript.html
@@ -0,0 +1,4 @@
+
+ Indicates that the global default subject or content includes a script.
+ If they are used within an email, the whole email will be evaluated as a script.
+
diff --git a/src/main/webapp/help/projectConfig/buildForTesting.html b/src/main/webapp/help/projectConfig/buildForTesting.html
new file mode 100644
index 0000000..017db19
--- /dev/null
+++ b/src/main/webapp/help/projectConfig/buildForTesting.html
@@ -0,0 +1,3 @@
+
+ Specifies the build used by the Test Against Build button. Example: common/12
+
diff --git a/src/main/webapp/help/projectConfig/charset.html b/src/main/webapp/help/projectConfig/charset.html
new file mode 100644
index 0000000..a30d9bf
--- /dev/null
+++ b/src/main/webapp/help/projectConfig/charset.html
@@ -0,0 +1,4 @@
+
+ The charset of the emails sent after a build. If this is set
+ to "default", then it uses the value set on the main configuration page.
+
diff --git a/src/main/webapp/help/projectConfig/mailType/script.html b/src/main/webapp/help/projectConfig/mailType/script.html
new file mode 100644
index 0000000..c97b9fd
--- /dev/null
+++ b/src/main/webapp/help/projectConfig/mailType/script.html
@@ -0,0 +1,6 @@
+
+ Specifies whether the mail's content should be interpreted as a Groovy
+ SimpleTemplate script.
+ If so, the script can access the AbstractBuild object using the
+ build bind variable.
+
diff --git a/src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java b/src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
index 56560d3..1bcb785 100644
--- a/src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
+++ b/src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
@@ -245,9 +245,11 @@ public class ExtendedEmailPublisherTest
{
JSONObject form = new JSONObject();
form.put( "project_content_type", "default" );
+ form.put( "project_charset", "default" );
form.put( "recipientlist_recipients", "ashlux@gmail.com" );
form.put( "project_default_subject", "Make millions in Nigeria" );
form.put( "project_default_content", "Give me a $1000 check and I'll mail you back $5000!!!" );
+ form.put( "project_build_for_testing", "" );
publisher = (ExtendedEmailPublisher) ExtendedEmailPublisher.DESCRIPTOR.newInstance( null, form );
diff --git a/src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java b/src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java
index 11eb30b..7b5a584 100644
--- a/src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java
+++ b/src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java
@@ -1,6 +1,7 @@
package hudson.plugins.emailext.plugins;
import hudson.model.AbstractBuild;
+import hudson.plugins.emailext.EmailType;
import hudson.plugins.emailext.ExtendedEmailPublisher;
import hudson.plugins.emailext.ExtendedEmailPublisherDescriptor;
import org.jvnet.hudson.test.HudsonTestCase;
@@ -147,18 +148,18 @@ public class ContentBuilderTest
public void testTransformText_shouldExpand_$PROJECT_DEFAULT_CONTENT()
throws IOException, InterruptedException
{
- assertEquals(publisher.defaultContent, new ContentBuilder().transformText( "$PROJECT_DEFAULT_CONTENT", publisher, null,
+ assertEquals(publisher.defaultContent, new ContentBuilder().transformText( "$PROJECT_DEFAULT_CONTENT", publisher, new EmailType(),
mock( AbstractBuild.class ) ));
- assertEquals(publisher.defaultContent, new ContentBuilder().transformText( "${PROJECT_DEFAULT_CONTENT}", publisher, null,
+ assertEquals(publisher.defaultContent, new ContentBuilder().transformText( "${PROJECT_DEFAULT_CONTENT}", publisher, new EmailType(),
mock( AbstractBuild.class ) ));
}
public void testTransformText_shouldExpand_$PROJECT_DEFAULT_SUBJECT()
throws IOException, InterruptedException
{
- assertEquals(publisher.defaultSubject, new ContentBuilder().transformText( "$PROJECT_DEFAULT_SUBJECT", publisher, null,
+ assertEquals(publisher.defaultSubject, new ContentBuilder().transformText( "$PROJECT_DEFAULT_SUBJECT", publisher, new EmailType(),
mock( AbstractBuild.class ) ));
- assertEquals(publisher.defaultSubject, new ContentBuilder().transformText( "${PROJECT_DEFAULT_SUBJECT}", publisher, null,
+ assertEquals(publisher.defaultSubject, new ContentBuilder().transformText( "${PROJECT_DEFAULT_SUBJECT}", publisher, new EmailType(),
mock( AbstractBuild.class ) ));
}
@@ -166,10 +167,10 @@ public class ContentBuilderTest
throws IOException, InterruptedException
{
assertEquals( ExtendedEmailPublisher.DESCRIPTOR.getDefaultBody(),
- new ContentBuilder().transformText( "$DEFAULT_CONTENT", publisher, null,
+ new ContentBuilder().transformText( "$DEFAULT_CONTENT", publisher, new EmailType(),
mock( AbstractBuild.class ) ) );
assertEquals( ExtendedEmailPublisher.DESCRIPTOR.getDefaultBody(),
- new ContentBuilder().transformText( "${DEFAULT_CONTENT}", publisher, null,
+ new ContentBuilder().transformText( "${DEFAULT_CONTENT}", publisher, new EmailType(),
mock( AbstractBuild.class ) ) );
}
@@ -177,10 +178,10 @@ public class ContentBuilderTest
throws IOException, InterruptedException
{
assertEquals( ExtendedEmailPublisher.DESCRIPTOR.getDefaultSubject(),
- new ContentBuilder().transformText( "$DEFAULT_SUBJECT", publisher, null,
+ new ContentBuilder().transformText( "$DEFAULT_SUBJECT", publisher, new EmailType(),
mock( AbstractBuild.class ) ) );
assertEquals( ExtendedEmailPublisher.DESCRIPTOR.getDefaultSubject(),
- new ContentBuilder().transformText( "${DEFAULT_SUBJECT}", publisher, null,
+ new ContentBuilder().transformText( "${DEFAULT_SUBJECT}", publisher, new EmailType(),
mock( AbstractBuild.class ) ) );
}
}
--
1.7.2.3