X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fnntp.t;h=57fef48b2169d27d20925d2fa2c55588ec4a478a;hb=refs%2Ftags%2Fv1.1.0-pre1;hp=7500d6b9a57662ce7708a644984e7d0616cdd035;hpb=9d1e5fadd7d18f4c96ab0509d673040e34225a04;p=public-inbox.git
diff --git a/t/nntp.t b/t/nntp.t
index 7500d6b9..57fef48b 100644
--- a/t/nntp.t
+++ b/t/nntp.t
@@ -1,5 +1,5 @@
-# Copyright (C) 2015 all contributors
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2015-2018 all contributors
+# License: AGPL-3.0+
use strict;
use warnings;
use Test::More;
@@ -109,7 +109,9 @@ use_ok 'PublicInbox::Inbox';
is($ng->base_url, $u, 'URL expanded');
my $mid = 'a@b';
my $mime = Email::MIME->new("Message-ID: <$mid>\r\n\r\n");
- PublicInbox::NNTP::set_nntp_headers($mime->header_obj, $ng, 1, $mid);
+ my $hdr = $mime->header_obj;
+ my $mock_self = { nntpd => { grouplist => [] } };
+ PublicInbox::NNTP::set_nntp_headers($mock_self, $hdr, $ng, 1, $mid);
is_deeply([ $mime->header('Message-ID') ], [ "<$mid>" ],
'Message-ID unchanged');
is_deeply([ $mime->header('Archived-At') ], [ "<${u}a\@b/>" ],
@@ -124,7 +126,7 @@ use_ok 'PublicInbox::Inbox';
'Xref: set');
$ng->{-base_url} = 'http://mirror.example.com/m/';
- PublicInbox::NNTP::set_nntp_headers($mime->header_obj, $ng, 2, $mid);
+ PublicInbox::NNTP::set_nntp_headers($mock_self, $hdr, $ng, 2, $mid);
is_deeply([ $mime->header('Message-ID') ], [ "<$mid>" ],
'Message-ID unchanged');
is_deeply([ $mime->header('Archived-At') ],