Added a test for direct rendering of a template from a view object, without a
[catagits/Catalyst-View-TT.git] / t / 11norequest.t
diff --git a/t/11norequest.t b/t/11norequest.t
new file mode 100644 (file)
index 0000000..9a562b0
--- /dev/null
@@ -0,0 +1,13 @@
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+BEGIN { use_ok 'TestApp' or die }
+
+ok my $c  = TestApp->new, 'Instantiate app object';
+ok my $tt = $c->view('TT'), 'Get TT view object';
+is $tt->render($c, 'test.tt', { message => 'hello' }), 'hello',
+    'render() should return the template output';