-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da75bf7
commit 26c9e31
Showing
8 changed files
with
41 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
source :rubygems | ||
source 'https://rubygems.org' | ||
|
||
gemspec |
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require "test_helper" | ||
|
||
class EmServerTest < MiniTest::Unit::TestCase | ||
def setup | ||
@em_host = 'localhost' | ||
@em_port = 2525 | ||
end | ||
|
||
def test_multiple_recipients | ||
c = nil | ||
EM.run { | ||
EM.start_server(@em_host, @em_port, MailSandbox::Server) { |conn| c = conn } | ||
|
||
EM::Timer.new(5) { EM.stop } | ||
|
||
EM::Protocols::SmtpClient.send ({ | ||
host: @em_host, | ||
port: @em_port, | ||
domain: "example.com", | ||
from: "me@example.com", | ||
to: ["you@example.com", "we@example.com"], | ||
header: {"Subject"=>"Email subject line", "Reply-to"=>"me@example.com"}, | ||
body: "Not much of interest here." | ||
}) | ||
} | ||
|
||
assert_equal( c.message.recipients, ["<you@example.com>", "<we@example.com>"] ) | ||
end | ||
end |
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 |
---|---|---|
|
@@ -53,8 +53,4 @@ def test_server_auth | |
|
||
assert alive? | ||
end | ||
|
||
|
||
|
||
|
||
end |
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