diff options
author | Eric Wong <e@80x24.org> | 2019-05-15 01:18:07 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-15 01:18:52 +0000 |
commit | 70caf43a131fc5bdf7104f82f2acee9d5353d6a8 (patch) | |
tree | 54691cbe7b16adf0fd8406d2a3a514bbd19741ce /t | |
parent | e981538130dd6d285392f4316328edbadab0d330 (diff) | |
download | public-inbox-70caf43a131fc5bdf7104f82f2acee9d5353d6a8.tar.gz |
www: use Inbox->over where appropriate
We don't need to rely on Xapian search functionality for the majority of the WWW code, even. subject_normalized is moved to SearchMsg, where it (probably) makes more sense, anyways.
Diffstat (limited to 't')
-rw-r--r-- | t/search.t | 4 | ||||
-rw-r--r-- | t/v2writable.t | 2 | ||||
-rw-r--r-- | t/view.t | 1 |
3 files changed, 4 insertions, 3 deletions
@@ -223,7 +223,7 @@ $ibx->with_umask(sub { $rw_commit->(); $ro->reopen; - my $t = $ro->get_thread('root@s'); + my $t = $ro->{over_ro}->get_thread('root@s'); is(scalar(@$t), 4, "got all 4 mesages in thread"); my @exp = sort($long_reply_mid, 'root@s', 'last@s', $long_mid); @res = filter_mids($t); @@ -422,7 +422,7 @@ $ibx->with_umask(sub { if (scalar(@$n) >= 1) { my $mid = $n->[0]->mid; my ($id, $prev); - $art = $ro->next_by_mid($mid, \$id, \$prev); + $art = $ro->{over_ro}->next_by_mid($mid, \$id, \$prev); ok($art, 'article exists in OVER DB'); } $rw->unindex_blob($amsg); diff --git a/t/v2writable.t b/t/v2writable.t index 5f34d127..b0f88d27 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -258,7 +258,7 @@ EOF ok($im->add($mime), 'add excessively long References'); $im->barrier; - my $msgs = $ibx->search->reopen->get_thread('x'x244); + my $msgs = $ibx->search->{over_ro}->get_thread('x'x244); is(2, scalar(@$msgs), 'got both messages'); is($msgs->[0]->{mid}, 'x'x244, 'stored truncated mid'); is($msgs->[1]->{references}, '<'.('x'x244).'>', 'stored truncated ref'); @@ -13,6 +13,7 @@ my $ctx = { env => { HTTP_HOST => 'example.com', 'psgi.url_scheme' => 'http' }, -inbox => Plack::Util::inline_object( name => 'test', + over => sub { undef }, search => sub { undef }, base_url => sub { 'http://example.com/' }, cloneurl => sub {[]}, |