-
Notifications
You must be signed in to change notification settings - Fork 5
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 #65 from The-Huginn/issue-60
Group links by project, add username into subject of the email
- Loading branch information
Showing
3 changed files
with
20 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ public void testAssigningOneIssue() throws Exception { | |
|
||
List<Mail> sent = mailbox.getMailsSentTo(email); | ||
assertEquals(1, sent.size()); | ||
assertEquals(Lottery.EMAIL_SUBJECT, sent.get(0).getSubject()); | ||
assertEquals(Lottery.EMAIL_SUBJECT.formatted("The-Huginn"), sent.get(0).getSubject()); | ||
assertEquals(Lottery.createEmailText(email, List.of(ourIssues.get(0))), sent.get(0).getText()); | ||
} | ||
|
||
|
@@ -89,7 +89,6 @@ public void testAssigningOneIssueOnlyProjectDefined() throws Exception { | |
|
||
List<Mail> sent = mailbox.getMailsSentTo(email); | ||
assertEquals(1, sent.size()); | ||
assertEquals(Lottery.EMAIL_SUBJECT, sent.get(0).getSubject()); | ||
assertEquals(Lottery.createEmailText(email, List.of(ourIssues.get(0))), sent.get(0).getText()); | ||
} | ||
|
||
|
@@ -121,7 +120,6 @@ public void testAssigningAllIssues() throws Exception { | |
|
||
List<Mail> sent = mailbox.getMailsSentTo(email); | ||
assertEquals(1, sent.size()); | ||
assertEquals(Lottery.EMAIL_SUBJECT, sent.get(0).getSubject()); | ||
assertEquals(Lottery.createEmailText(email, List.of(ourIssues.get(0), ourIssues.get(1))), sent.get(0).getText()); | ||
} | ||
|
||
|
@@ -182,6 +180,7 @@ public void testExtractingUsername() throws Exception { | |
assertEquals(1, sent.size()); | ||
// Check for correct parsing of username from email | ||
assertTrue(sent.get(0).getText().contains("Hi The-Huginn,")); | ||
assertTrue(sent.get(0).getSubject().contains("The-Huginn")); | ||
} | ||
|
||
@Test | ||
|
@@ -247,7 +246,7 @@ public void testAssigningAllIssuesToTwoParticipants() throws Exception { | |
Map.entry("[email protected]", ourIssues.get(1)))) { | ||
List<Mail> sent = mailbox.getMailsSentTo(userIssue.getKey()); | ||
assertEquals(1, sent.size()); | ||
assertEquals(Lottery.EMAIL_SUBJECT, sent.get(0).getSubject()); | ||
assertEquals(Lottery.EMAIL_SUBJECT.formatted(Lottery.getUsername(userIssue.getKey())), sent.get(0).getSubject()); | ||
assertEquals(Lottery.createEmailText(userIssue.getKey(), List.of(userIssue.getValue())), | ||
sent.get(0).getText()); | ||
} | ||
|
@@ -278,7 +277,6 @@ public void testAssigningMaximumIssues() throws Exception { | |
|
||
List<Mail> sent = mailbox.getMailsSentTo(email); | ||
assertEquals(1, sent.size()); | ||
assertEquals(Lottery.EMAIL_SUBJECT, sent.get(0).getSubject()); | ||
assertEquals(Lottery.createEmailText(email, List.of(ourIssues.get(2))), sent.get(0).getText()); | ||
} | ||
} |
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