about summary refs log tree commit homepage
path: root/t/psgi_v2.t
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-29 09:57:45 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-29 09:59:55 +0000
commit9aaf9cf73f7b126ad3d2726adf7c764630626d67 (patch)
treea34658235bfc1559404004d7cbb0d2c693fd600d /t/psgi_v2.t
parent6efc0df8d3e00da0257b131e96f74d18fce290ab (diff)
downloadpublic-inbox-9aaf9cf73f7b126ad3d2726adf7c764630626d67.tar.gz
The original Message-ID is still the most important when
discussing with other recipients who do not rely on a message
flowing through public-inbox.  So whatever Message-ID we use
to deduplicate internally will be secondary and less important.

All of our front-end v2 code is order-independent, so we won't
let the message count against us, that way.
Diffstat (limited to 't/psgi_v2.t')
-rw-r--r--t/psgi_v2.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index 9964b477..11b2c794 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -7,6 +7,7 @@ use File::Temp qw/tempdir/;
 use PublicInbox::MIME;
 use PublicInbox::Config;
 use PublicInbox::WWW;
+use PublicInbox::MID qw(mids);
 my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test
                 URI::Escape Plack::Builder);
 foreach my $mod (@mods) {
@@ -46,8 +47,8 @@ local $SIG{__WARN__} = sub { push @warn, @_ };
 $mime->header_set(Date => 'Fri, 02 Oct 1993 00:01:00 +0000');
 ok($im->add($mime), 'added duplicate-but-different message');
 is(scalar(@warn), 1, 'got one warning');
-my @mids = $mime->header_obj->header_raw('Message-Id');
-$new_mid = PublicInbox::MID::mid_clean($mids[0]);
+my $mids = mids($mime->header_obj);
+$new_mid = $mids->[1];
 $im->done;
 
 my $cfgpfx = "publicinbox.v2test";
@@ -93,8 +94,8 @@ is(scalar(@warn), 2, 'got another warning');
 like($warn[0], qr/mismatched/, 'warned about mismatched messages');
 is($warn[0], $warn[1], 'both warnings are the same');
 
-@mids = $mime->header_obj->header_raw('Message-Id');
-my $third = PublicInbox::MID::mid_clean($mids[0]);
+$mids = mids($mime->header_obj);
+my $third = $mids->[-1];
 $im->done;
 
 test_psgi(sub { $www->call(@_) }, sub {