Skip to content

Commit

Permalink
Item5846: finalize the engine
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@874 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Nov 23, 2008
1 parent 0b6f958 commit 7c1133a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion UnitTestContrib/test/unit/ViewScriptTests.pm
Expand Up @@ -79,8 +79,16 @@ sub setup_view {
template => [ $tmpl ],
});
$query->path_info( "/$web/$topic" );
$query->method('POST');
$twiki = new Foswiki( $this->{test_user_login}, $query );
my ($text, $result) = $this->capture( \&Foswiki::UI::View::view, $twiki);
my ($text, $result) = $this->capture(
sub {
Foswiki::UI::View::view( $twiki);
$Foswiki::engine->finalize(
$twiki->{response},
$twiki->{request});
});

$twiki->finish();
$text =~ s/\r//g;
$text =~ s/^.*?\n\n+//s; # remove CGI header
Expand Down

0 comments on commit 7c1133a

Please sign in to comment.