Skip to content

Commit

Permalink
Add default options to whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
dewski committed Mar 14, 2012
1 parent 3325a34 commit 27854ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_helper.rb
Expand Up @@ -28,7 +28,7 @@ class Test::Unit::TestCase
# Returns instance of Mail::Message. # Returns instance of Mail::Message.
def with_whitelist(options={}) def with_whitelist(options={})
filter = MailGate::Filter.new \ filter = MailGate::Filter.new \
:whitelist => options.delete(:whitelist), :whitelist => options.fetch(:whitelist, /.*/),
:subject_prefix => options.delete(:subject_prefix), :subject_prefix => options.delete(:subject_prefix),
:append_emails => options.delete(:append_emails) :append_emails => options.delete(:append_emails)


Expand Down
2 changes: 1 addition & 1 deletion test/unit/mail_gate/filter_test.rb
Expand Up @@ -9,7 +9,7 @@ def test_without_whitelist_regex
def test_with_whitelist_as_string def test_with_whitelist_as_string
mail = with_whitelist \ mail = with_whitelist \
:to => 'garrett@site.com', :to => 'garrett@site.com',
:whitelist => '@site.com' :whitelist => /\@site.com/
assert_equal %w{ garrett@site.com }, mail.to assert_equal %w{ garrett@site.com }, mail.to
end end


Expand Down

0 comments on commit 27854ca

Please sign in to comment.