summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-02-28 13:49:09 -0500
committerJames Moger <james.moger@gitblit.com>2014-02-28 13:49:09 -0500
commitd7c5a62f95c06839bda044d4bed11117219ad1a7 (patch)
tree88ac9dd2e2a8b47a4ae634b1968c493670ed57bb /src/test
parent4be7d8cd93084a2be3cd85f1d51dcb21af67eccf (diff)
downloadgitblit-d7c5a62f95c06839bda044d4bed11117219ad1a7.tar.gz
gitblit-d7c5a62f95c06839bda044d4bed11117219ad1a7.zip
Improve notification api by introducing the Mailing model
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/gitblit/tests/MailTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/com/gitblit/tests/MailTest.java b/src/test/java/com/gitblit/tests/MailTest.java
index df09ca59..0224e84e 100644
--- a/src/test/java/com/gitblit/tests/MailTest.java
+++ b/src/test/java/com/gitblit/tests/MailTest.java
@@ -21,6 +21,7 @@ import org.junit.Test;
import com.gitblit.FileSettings;
import com.gitblit.Keys;
+import com.gitblit.models.Mailing;
import com.gitblit.service.MailService;
public class MailTest extends GitblitUnitTest {
@@ -29,7 +30,9 @@ public class MailTest extends GitblitUnitTest {
public void testSendMail() throws Exception {
FileSettings settings = new FileSettings("mailtest.properties");
MailService mail = new MailService(settings);
- Message message = mail.createMessage(settings.getStrings(Keys.mail.adminAddresses));
+ Mailing mailing = Mailing.newPlain();
+ mailing.setRecipients(settings.getStrings(Keys.mail.adminAddresses));
+ Message message = mail.createMessage(mailing);
message.setSubject("Test");
message.setText("Lägger till andra stycket i ny fil. UTF-8 encoded");
mail.queue(message);