<commit_before>require_relative '../test_helper'

class RepliesMailbox < ActionMailroom::Mailbox
  def process
    $processed = true
  end
end

module ActionMailroom
  class RouterTest < ActiveSupport::TestCase
    setup do
      @router = ActionMailroom::Router.new('<EMAIL>' => :replies)
      $processed = false
    end

    test "routed to mailbox" do
      @router.route create_inbound_email("welcome.eml")
      assert $processed
    end
  end
end<commit_msg>Assert the intended email was processed<commit_after>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('<EMAIL>' => :replies)
      $processed = false
    end

    test "routed to mailbox" do
      @router.route create_inbound_email("welcome.eml")
      assert_equal $processed, "Discussion: Let's debate these attachments"
    end
  end
end
{'fraction_non_alphanumeric': 0.08858267716535433, 'fraction_numerical': 0.0, 'mean_word_length': 3.7083333333333335, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7215493', 'n_tokens_mistral': 311, 'n_tokens_neox': 301, 'n_words': 81}