diff options
author | Eric Wong <e@80x24.org> | 2016-06-20 00:57:16 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-20 00:57:38 +0000 |
commit | 4b313dc74bc9bb84a542b7ec920cdb92879e7523 (patch) | |
tree | bdea400b15979d0d4206aa8aa840c71ed956eaca /t/html_index.t | |
parent | 2724361ab69cd071c970c66e076784c582c76e42 (diff) | |
download | public-inbox-4b313dc74bc9bb84a542b7ec920cdb92879e7523.tar.gz |
Favor Inbox objects as our primary source of truth to simplify our code. This increases our coupling with PSGI to make it easier to write tests in the future. A lot of this code was originally designed to be usable standalone without PSGI or CGI at all; but that might increase development effort.
Diffstat (limited to 't/html_index.t')
-rw-r--r-- | t/html_index.t | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/t/html_index.t b/t/html_index.t index 6896eb41..32d7b8de 100644 --- a/t/html_index.t +++ b/t/html_index.t @@ -7,10 +7,18 @@ use Email::MIME; use PublicInbox::Feed; use PublicInbox::Git; use PublicInbox::Import; +use PublicInbox::Inbox; use File::Temp qw/tempdir/; my $tmpdir = tempdir('pi-http-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $git_dir = "$tmpdir/gittest"; -my $git = PublicInbox::Git->new($git_dir); +my $ibx = PublicInbox::Inbox->new({ + address => 'test@example', + -primary_address => 'test@example', + name => 'tester', + mainrepo => $git_dir, + url => 'http://example.com/test', +}); +my $git = $ibx->git; my $im = PublicInbox::Import->new($git, 'tester', 'test@example'); # setup @@ -55,7 +63,7 @@ EOF { use IO::File; my $cb = PublicInbox::Feed::generate_html_index({ - git_dir => $git_dir, + -inbox => $ibx, max => 3 }); require 't/common.perl'; |