#!/usr/bin/env perl use 5.040; use re '/aasx'; use warnings FATAL => 'all'; use Test::More; use FindBin::libs; require_ok('Trog::Routes::HTML') or BAIL_OUT("Can't find SUT"); subtest 'rss_style' => sub { my $res = Trog::Routes::HTML::rss_style( { route => '/styles/rss-style.xsl', title => 'x' } ); my $body = join( '', @{ $res->[2] } ); is( $res->[0], 200, 'renders' ); like( $body, qr{<xsl:value-of[ ]select="rss/channel/title"/>}, 'with the title of the channel as its title' ); unlike( $body, qr{x}, 'and not a title from the query' ); }; done_testing();