blob: 6bfd880b67542af5a8d330eb1892fd7900aaabf2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require_relative '../test_helper'
class RepliesMailbox < ActionMailroom::Mailbox
def process
$processed = mail.subject
end
end
module ActionMailroom
class RouterTest < ActiveSupport::TestCase
setup do
@router = ActionMailroom::Router.new
@router.add_routes('replies@example.com' => :replies)
$processed = false
end
test "routed to mailbox" do
@router.route create_inbound_email("welcome.eml")
assert_equal "Discussion: Let's debate these attachments", $processed
end
end
end
|