Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Commit

Permalink
Test headers and footers
Browse files Browse the repository at this point in the history
  • Loading branch information
markpasc committed Dec 5, 2011
1 parent 016aeff commit ff99f8f
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion plugins/Order/t/11-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use MT::Template::Context;
use MT::Builder;
use MT::App;

use Test::More tests => 5;
use Test::More tests => 6;

use Order::Plugin;

Expand Down Expand Up @@ -67,6 +67,26 @@ $t = <<EOF;
EOF
like(build($t), qr{ \A \s* goodbye \s+ hello \s* \z }xms, "Order puts two items in order");

$t = <<EOF;
<mt:Order>
<mt:OrderItem>
<mt:setvarblock name="order_by">bar</mt:setvarblock>
hello
</mt:OrderItem>
<mt:OrderFooter>
farewell
</mt:OrderFooter>
<mt:OrderItem>
<mt:setvarblock name="order_by">foo</mt:setvarblock>
goodbye
</mt:OrderItem>
<mt:OrderHeader>
hi
</mt:OrderHeader>
</mt:Order>
EOF
like(build($t), qr{ \A \s* hi \s+ goodbye \s+ hello \s+ farewell \s* \z }xms, "Order puts two items in order");

$t = <<EOF;
<mt:Order>
<mt:For from="5" to="9">
Expand Down

0 comments on commit ff99f8f

Please sign in to comment.