From 015c33f4cd6758e2c7d43f82ff5da93bac5cf3e3 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 3 Oct 2018 20:44:31 -0400 Subject: Compare addresses case-insensitively --- test/unit/router_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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) -- cgit v1.2.3