]> Sergey Matveev's repositories - public-inbox.git/blob - t/inbox.t
git: remove ->commit_title method
[public-inbox.git] / t / inbox.t
1 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 use strict;
4 use warnings;
5 use Test::More;
6 use_ok 'PublicInbox::Inbox';
7 my $x = PublicInbox::Inbox->new({url => [ '//example.com/test/' ]});
8 is($x->base_url, 'https://example.com/test/', 'expanded protocol-relative');
9 $x = PublicInbox::Inbox->new({url => [ 'http://example.com/test' ]});
10 is($x->base_url, 'http://example.com/test/', 'added trailing slash');
11
12 $x = PublicInbox::Inbox->new({});
13 is($x->base_url, undef, 'undef base_url allowed');
14
15 done_testing();