]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2reindex.t
t/v2reindex.t: Don't reuse $ibx as two different kinds of variable
[public-inbox.git] / t / v2reindex.t
index 9bc271fc2d35312b4a1eae20fae24112afb92fb4..5bc307f1cac11ed34c3c3ec6e4c8258544c85652 100644 (file)
@@ -14,13 +14,13 @@ foreach my $mod (qw(DBD::SQLite Search::Xapian)) {
 }
 use_ok 'PublicInbox::V2Writable';
 my $mainrepo = tempdir('pi-v2reindex-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $ibx = {
+my $ibx_config = {
        mainrepo => $mainrepo,
        name => 'test-v2writable',
        version => 2,
        -primary_address => 'test@example.com',
 };
-$ibx = PublicInbox::Inbox->new($ibx);
+my $ibx = PublicInbox::Inbox->new($ibx_config);
 my $mime = PublicInbox::MIME->create(
        header => [
                From => 'a@example.com',
@@ -48,6 +48,7 @@ if ('test remove later') {
 $im->done;
 my $minmax = [ $ibx->mm->minmax ];
 ok(defined $minmax->[0] && defined $minmax->[1], 'minmax defined');
+is_deeply($minmax, [ 1, 10 ], 'minmax as expected');
 
 eval { $im->index_sync({reindex => 1}) };
 is($@, '', 'no error from reindexing');