Skip to content

Commit

Permalink
Update email message. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
acodcha authored Dec 9, 2023
1 parent 4f3c454 commit 4866116
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions source/Messenger/Emailer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ std::string ComposeFullMessageBody(

text.append(main_message_body + "\n\n");

text.append("Your giftee is:\n\n");
text.append(giftee.Name() + "\n");
text.append("Your giftee is: " + giftee.Name() + "\n\n");

text.append("Mail to:\n\n");
text.append(giftee.Name() + " SECRET SANTA\n");
if (!giftee.Address().empty()) {
text.append(giftee.Address() + "\n");
}
Expand Down
5 changes: 3 additions & 2 deletions test/Messenger/Emailer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ TEST(MessengerEmailer, ComposeFullMessageBody) {
EXPECT_EQ(result,
"Hello Alice Smith,\n\nYou are receiving this message because you "
"opted to participate in a Secret Santa gift exchange!\n\nYour "
"giftee is:\n\nBob Johnson\n456 Second St, Apt 2, Villagetown, CA "
"92345 USA\n\nThank you!");
"giftee is: Bob Johnson\n\nMail to:\n\nBob Johnson SECRET "
"SANTA\n456 Second St, Apt 2, Villagetown, CA 92345 USA\n\nThank "
"you!");
}

TEST(MessengerEmailer, ComposeCommand) {
Expand Down

0 comments on commit 4866116

Please sign in to comment.