]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mda.t
public-inbox 1.1.0-pre1
[public-inbox.git] / t / mda.t
diff --git a/t/mda.t b/t/mda.t
index f3c5164b44b3ef36e556f752fb71e780f25f61f6..5dbcec63fc100dfa5c60e84e0c82353a58c23d69 100644 (file)
--- a/t/mda.t
+++ b/t/mda.t
@@ -1,5 +1,5 @@
-# Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2014-2018 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
 use Test::More;
@@ -57,7 +57,7 @@ local $ENV{GIT_COMMITTER_NAME} = eval {
        my $msg = Email::MIME->new($str);
 
        my $from = $msg->header('From');
-       my $author = PublicInbox::Address::from_name($from);
+       my ($author) = PublicInbox::Address::names($from);
        my ($email) = PublicInbox::Address::emails($from);
        my $date = $msg->header('Date');
 
@@ -187,6 +187,7 @@ EOF
                # now train it
                local $ENV{GIT_AUTHOR_EMAIL} = 'trainer@example.com';
                local $ENV{GIT_COMMITTER_EMAIL} = 'trainer@example.com';
+               local $ENV{GIT_COMMITTER_NAME} = undef;
                IPC::Run::run([$learn, "spam"], \$msg);
                is($?, 0, "no failure from learning spam");
                IPC::Run::run([$learn, "spam"], \$msg);