-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from agorapulse/feature/allow-adding-configur…
…ation-set-on-emails Allow adding configuration set on emails
- Loading branch information
Showing
10 changed files
with
76 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,12 +51,13 @@ class SendEmailSpec extends Specification { | |
from '[email protected]' // <3> | ||
to '[email protected]' // <4> | ||
htmlBody '<p>This is an example body</p>' // <5> | ||
tags mapOfTags // <6> | ||
attachment { // <7> | ||
filepath thePath // <8> | ||
filename 'test.pdf' // <9> | ||
mimeType 'application/pdf' // <10> | ||
description 'An example pdf' // <11> | ||
configurationSetName 'configuration-set' // <6> | ||
tags mapOfTags // <7> | ||
attachment { // <8> | ||
filepath thePath // <9> | ||
filename 'test.pdf' // <10> | ||
mimeType 'application/pdf' // <11> | ||
description 'An example pdf' // <12> | ||
} | ||
} | ||
// end::builder[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,12 +65,13 @@ public void testSendEmail() throws IOException { | |
.from("[email protected]") // <3> | ||
.to("[email protected]") // <4> | ||
.htmlBody("<p>This is an example body</p>") // <5> | ||
.tags(mapOfTags) // <6> | ||
.attachment(a -> // <7> | ||
a.filepath(filepath) // <8> | ||
.filename("test.pdf") // <9> | ||
.mimeType("application/pdf") // <10> | ||
.description("An example pdf") // <11> | ||
.configurationSetName("configuration-set") // <6> | ||
.tags(mapOfTags) // <7> | ||
.attachment(a -> // <8> | ||
a.filepath(filepath) // <9> | ||
.filename("test.pdf") // <10> | ||
.mimeType("application/pdf") // <11> | ||
.description("An example pdf") // <12> | ||
) | ||
); | ||
// end::builder[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import spock.lang.Subject | |
/** | ||
* Tests for simple email service. | ||
*/ | ||
@SuppressWarnings(['AbcMetric', 'JavaIoPackageAccess']) | ||
@SuppressWarnings(['AbcMetric', 'JavaIoPackageAccess', 'UnnecessaryObjectReferences']) | ||
class SimpleEmailServiceSpec extends Specification { | ||
|
||
SesClient simpleEmailService = Mock(SesClient) | ||
|
@@ -52,6 +52,7 @@ class SimpleEmailServiceSpec extends Specification { | |
from '[email protected]' | ||
to '[email protected]' | ||
htmlBody '<p>This is an example body</p>' | ||
configurationSetName 'configuration-set' | ||
tags customTags | ||
attachment { | ||
filename 'test.pdf' | ||
|
@@ -67,6 +68,7 @@ class SimpleEmailServiceSpec extends Specification { | |
transactionalEmail.htmlBody == '<p>This is an example body</p>' | ||
transactionalEmail.from == '[email protected]' | ||
transactionalEmail.recipients == ['[email protected]'] | ||
transactionalEmail.configurationSetName == 'configuration-set' | ||
transactionalEmail.tags == [key1: 'value1', key2: 'value2'] | ||
transactionalEmail.attachments.size() == 1 | ||
transactionalEmail.attachments.first().filename == 'test.pdf' | ||
|
@@ -86,6 +88,7 @@ class SimpleEmailServiceSpec extends Specification { | |
htmlBody '<p>This is an example body</p>' | ||
to '[email protected]' | ||
from '[email protected]' | ||
configurationSetName 'configuration-set' | ||
tags customTags | ||
attachment { | ||
filepath f.absolutePath | ||
|
@@ -98,6 +101,7 @@ class SimpleEmailServiceSpec extends Specification { | |
transactionalEmail.htmlBody == '<p>This is an example body</p>' | ||
transactionalEmail.from == '[email protected]' | ||
transactionalEmail.recipients == ['[email protected]'] | ||
transactionalEmail.configurationSetName == 'configuration-set' | ||
transactionalEmail.tags == [key1: 'value1', key2: 'value2'] | ||
transactionalEmail.attachments.size() == 1 | ||
transactionalEmail.attachments.first().filename == 'groovylogo.png' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,12 +54,13 @@ class SendEmailSpec extends Specification { | |
from '[email protected]' // <3> | ||
to '[email protected]' // <4> | ||
htmlBody '<p>This is an example body</p>' // <5> | ||
tags mapOfTags // <6> | ||
attachment { // <7> | ||
filepath thePath // <8> | ||
filename 'test.pdf' // <9> | ||
mimeType 'application/pdf' // <10> | ||
description 'An example pdf' // <11> | ||
configurationSetName 'configuration-set' // <6> | ||
tags mapOfTags // <7> | ||
attachment { // <8> | ||
filepath thePath // <9> | ||
filename 'test.pdf' // <10> | ||
mimeType 'application/pdf' // <11> | ||
description 'An example pdf' // <12> | ||
} | ||
} | ||
// end::builder[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,12 +66,13 @@ public void testSendEmail() throws IOException { | |
.from("[email protected]") // <3> | ||
.to("[email protected]") // <4> | ||
.htmlBody("<p>This is an example body</p>") // <5> | ||
.tags(mapOfTags) // <6> | ||
.attachment(a -> // <7> | ||
a.filepath(filepath) // <8> | ||
.filename("test.pdf") // <9> | ||
.mimeType("application/pdf") // <10> | ||
.description("An example pdf") // <11> | ||
.configurationSetName("configuration-set") // <6> | ||
.tags(mapOfTags) // <7> | ||
.attachment(a -> // <8> | ||
a.filepath(filepath) // <9> | ||
.filename("test.pdf") // <10> | ||
.mimeType("application/pdf") // <11> | ||
.description("An example pdf") // <12> | ||
) | ||
); | ||
// end::builder[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import spock.lang.Subject | |
/** | ||
* Tests for simple email service. | ||
*/ | ||
@SuppressWarnings(['AbcMetric', 'JavaIoPackageAccess']) | ||
@SuppressWarnings(['AbcMetric', 'JavaIoPackageAccess', 'UnnecessaryObjectReferences']) | ||
class SimpleEmailServiceSpec extends Specification { | ||
|
||
AmazonSimpleEmailService simpleEmailService = Mock(AmazonSimpleEmailService) | ||
|
@@ -49,6 +49,7 @@ class SimpleEmailServiceSpec extends Specification { | |
from '[email protected]' | ||
to '[email protected]' | ||
htmlBody '<p>This is an example body</p>' | ||
configurationSetName 'configuration-set' | ||
tags customTags | ||
attachment { | ||
filename 'test.pdf' | ||
|
@@ -64,6 +65,7 @@ class SimpleEmailServiceSpec extends Specification { | |
transactionalEmail.htmlBody == '<p>This is an example body</p>' | ||
transactionalEmail.from == '[email protected]' | ||
transactionalEmail.recipients == ['[email protected]'] | ||
transactionalEmail.configurationSetName == 'configuration-set' | ||
transactionalEmail.tags == [key1: 'value1', key2: 'value2'] | ||
transactionalEmail.attachments.size() == 1 | ||
transactionalEmail.attachments.first().filename == 'test.pdf' | ||
|
@@ -83,6 +85,7 @@ class SimpleEmailServiceSpec extends Specification { | |
htmlBody '<p>This is an example body</p>' | ||
to '[email protected]' | ||
from '[email protected]' | ||
configurationSetName 'configuration-set' | ||
tags customTags | ||
attachment { | ||
filepath f.absolutePath | ||
|
@@ -95,6 +98,7 @@ class SimpleEmailServiceSpec extends Specification { | |
transactionalEmail.htmlBody == '<p>This is an example body</p>' | ||
transactionalEmail.from == '[email protected]' | ||
transactionalEmail.recipients == ['[email protected]'] | ||
transactionalEmail.configurationSetName == 'configuration-set' | ||
transactionalEmail.tags == [key1: 'value1', key2: 'value2'] | ||
transactionalEmail.attachments.size() == 1 | ||
transactionalEmail.attachments.first().filename == 'groovylogo.png' | ||
|