Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add default options to whitelist

  • Loading branch information...
commit 27854caea22dbba0f1a244e1c127f5eb2a6a86d8 1 parent 3325a34
@dewski authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  test/test_helper.rb
  2. +1 −1  test/unit/mail_gate/filter_test.rb
View
2  test/test_helper.rb
@@ -28,7 +28,7 @@ class Test::Unit::TestCase
# Returns instance of Mail::Message.
def with_whitelist(options={})
filter = MailGate::Filter.new \
- :whitelist => options.delete(:whitelist),
+ :whitelist => options.fetch(:whitelist, /.*/),
:subject_prefix => options.delete(:subject_prefix),
:append_emails => options.delete(:append_emails)
View
2  test/unit/mail_gate/filter_test.rb
@@ -9,7 +9,7 @@ def test_without_whitelist_regex
def test_with_whitelist_as_string
mail = with_whitelist \
:to => 'garrett@site.com',
- :whitelist => '@site.com'
+ :whitelist => /\@site.com/
assert_equal %w{ garrett@site.com }, mail.to
end
Please sign in to comment.
Something went wrong with that request. Please try again.