diff options
author | George Claghorn <george@basecamp.com> | 2018-10-03 20:44:31 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-10-03 20:44:31 -0400 |
commit | 015c33f4cd6758e2c7d43f82ff5da93bac5cf3e3 (patch) | |
tree | b1efa1f8109f2e8b10b533fd8bb02a75776a47e0 /test | |
parent | a91dc46b32b3062d2c75c226c733b04da50d0bc8 (diff) | |
download | rails-015c33f4cd6758e2c7d43f82ff5da93bac5cf3e3.tar.gz rails-015c33f4cd6758e2c7d43f82ff5da93bac5cf3e3.tar.bz2 rails-015c33f4cd6758e2c7d43f82ff5da93bac5cf3e3.zip |
Compare addresses case-insensitively
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/router_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/router_test.rb b/test/unit/router_test.rb index 67a5f24c52..cc87ae6c0e 100644 --- a/test/unit/router_test.rb +++ b/test/unit/router_test.rb @@ -49,6 +49,15 @@ module ActionMailbox assert_equal inbound_email.mail, $processed_mail end + test "single string routing case-insensitively" do + @router.add_routes("first@example.com" => :first) + + 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 + end + test "multiple string routes" do @router.add_routes("first@example.com" => :first, "second@example.com" => :second) |