X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fnntp.t;h=655af39825b2f514d621600399964db7ba4b450e;hb=f64adbd5e3c35197c1915bca108cdcd81f74f708;hp=3d2f524c4a7d4c704a0ee269256bfef8cd81dc52;hpb=416d1c3f6d5e5a857760ffc1b679e86a070bdbd4;p=public-inbox.git diff --git a/t/nntp.t b/t/nntp.t index 3d2f524c..655af398 100644 --- a/t/nntp.t +++ b/t/nntp.t @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2020 all contributors +# Copyright (C) 2015-2021 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -113,7 +113,7 @@ use PublicInbox::Config; my $mock_self = { nntpd => { servername => 'example.com', - pi_config => bless {}, 'PublicInbox::Config', + pi_cfg => bless {}, 'PublicInbox::Config', }, ibx => $ibx, }; @@ -121,25 +121,15 @@ use PublicInbox::Config; PublicInbox::NNTP::set_nntp_headers($hdr, $smsg); is_deeply([ $mime->header('Message-ID') ], [ "<$mid>" ], 'Message-ID unchanged'); - is_deeply([ $mime->header('Archived-At') ], [ "<${u}a\@b/>" ], - 'Archived-At: set'); - is_deeply([ $mime->header('List-Archive') ], [ "<$u>" ], - 'List-Archive: set'); - is_deeply([ $mime->header('List-Post') ], [ '' ], - 'List-Post: set'); is_deeply([ $mime->header('Newsgroups') ], [ 'test' ], 'Newsgroups: set'); is_deeply([ $mime->header('Xref') ], [ 'example.com test:1' ], 'Xref: set'); - $ibx->{-base_url} = 'http://mirror.example.com/m/'; $smsg->{num} = 2; PublicInbox::NNTP::set_nntp_headers($hdr, $smsg); is_deeply([ $mime->header('Message-ID') ], [ "<$mid>" ], 'Message-ID unchanged'); - is_deeply([ $mime->header('Archived-At') ], - [ "<${u}a\@b/>", '' ], - 'Archived-At: appended'); is_deeply([ $mime->header('Xref') ], [ 'example.com test:2' ], 'Old Xref: clobbered'); }