In class EnclosedMessage (within lib/sup/message_chunks.rb):
Ternary operator logic was backwards, e.g., setting @from to "unknown sender" if and only if from was truthy(!)
@lines was constructed using local variables instead of instance variables, which (happily?) masked the effects of the above backwards ternary logic. But this also created issue #571: Redwood::Person object representations were shown directly to the user, rather than the human-friendly parsed strings intended to be shown by Redwood::Person#full_address.
@lines was constructed as a single string (with literal line breaks), instead of following the normal convention of an array of lines. This hindered testability.
In this commit, we:
Fix the above three issues in EnclosedMessage.
Uncomment and expand upon the "TODO" tests for EnclosedMessage headers. These placeholders were added in PR #569, credit @danc86.
Modify test/fixtures/non-ascii-header-in-nested-message.eml to follow best practices for a testing email address, i.e., use reserved .invalid domain instead of b.c - to ensure that the testing email address remains invalid forever.
In class
EnclosedMessage
(withinlib/sup/message_chunks.rb
):Ternary operator logic was backwards, e.g., setting
@from
to"unknown sender"
if and only iffrom
was truthy(!)@lines
was constructed using local variables instead of instance variables, which (happily?) masked the effects of the above backwards ternary logic. But this also created issue #571:Redwood::Person
object representations were shown directly to the user, rather than the human-friendly parsed strings intended to be shown byRedwood::Person#full_address
.@lines
was constructed as a single string (with literal line breaks), instead of following the normal convention of an array of lines. This hindered testability.In this commit, we:
Fix the above three issues in
EnclosedMessage
.Uncomment and expand upon the "TODO" tests for
EnclosedMessage
headers. These placeholders were added in PR #569, credit @danc86.Modify
test/fixtures/non-ascii-header-in-nested-message.eml
to follow best practices for a testing email address, i.e., use reserved.invalid
domain instead ofb.c
- to ensure that the testing email address remains invalid forever.