]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/view.t
view: API cleanup, remove "as_" prefix
[public-inbox.git] / t / view.t
index 067f9890cc271abc0d1e7195b5d0e823ce677f6d..10a182b355da5786a5995c87c40f7208643404f4 100644 (file)
--- a/t/view.t
+++ b/t/view.t
@@ -34,10 +34,10 @@ EOF
                body => $body,
        );
        $s = Email::MIME->new($s->as_string);
-       my $html = PublicInbox::View->as_html($s);
+       my $html = PublicInbox::View->msg_html($s);
 
-       # ghetto
-       like($html, qr/<a href="hello%40/s, "MID link present");
+       # ghetto tests
+       like($html, qr!<a href="\.\./m/hello%40!s, "MID link present");
        like($html, qr/hello world\b/, "body present");
        like($html, qr/&gt; keep this inline/, "short quoted text is inline");
        like($html, qr/<a name=[^>]+>&gt; Long and wordy/,
@@ -45,7 +45,8 @@ EOF
 
        # short page
        my $pfx = "http://example.com/test/f";
-       my $short = PublicInbox::View->as_html($s, $pfx);
+       my $short = PublicInbox::View->msg_html($s, $pfx);
+       like($short, qr!<a href="hello%40!s, "MID link present");
        like($short, qr/\n&gt; keep this inline/,
                "short quoted text is inline");
        like($short, qr/<a href="\Q$pfx\E#[^>]+>Long and wordy/,
@@ -75,7 +76,7 @@ EOF
                parts => $parts,
        );
 
-       my $html = PublicInbox::View->as_html($mime);
+       my $html = PublicInbox::View->msg_html($mime);
        like($html, qr/hi\n-+ part #2 -+\nbye\n/, "multipart split");
 }
 
@@ -104,7 +105,7 @@ EOF
                parts => $parts,
        );
 
-       my $html = PublicInbox::View->as_html($mime);
+       my $html = PublicInbox::View->msg_html($mime);
        like($html, qr!see attached patch\n-+ foo\.patch -+\n--- a/file\n!,
                "parts split with filename");
 }