aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-25 16:58:00 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-25 16:58:00 -0700
commit1087d70182e066d11c708b8eee43fee25ba1bc3f (patch)
tree002d73a82ee37410005ce96d1f9f675d3b77804f /test
parent96b6e7ce669cf412f931e700fafc99d6d7ef031a (diff)
downloadrails-1087d70182e066d11c708b8eee43fee25ba1bc3f.tar.gz
rails-1087d70182e066d11c708b8eee43fee25ba1bc3f.tar.bz2
rails-1087d70182e066d11c708b8eee43fee25ba1bc3f.zip
Handle all recipients of an email as part of the routing
Diffstat (limited to 'test')
-rw-r--r--test/unit/router_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/unit/router_test.rb b/test/unit/router_test.rb
index 25a2651bb6..75701b669e 100644
--- a/test/unit/router_test.rb
+++ b/test/unit/router_test.rb
@@ -32,7 +32,16 @@ module ActionMailroom
inbound_email = create_inbound_email_from_mail(to: "first@example.com", subject: "This is a reply")
@router.route inbound_email
assert_equal "FirstMailbox", $processed_by
- assert_equal inbound_email.mail, $processed_mail
+ assert_equal inbound_email.mail, $processed_mail
+ end
+
+ test "single string routing on cc" do
+ @router.add_routes("first@example.com" => :first)
+
+ inbound_email = create_inbound_email_from_mail(to: "someone@example.com", cc: "first@example.com", subject: "This is a reply")
+ @router.route inbound_email
+ assert_equal "FirstMailbox", $processed_by
+ assert_equal inbound_email.mail, $processed_mail
end
test "multiple string routes" do