from psgi res tests working
[catagits/Catalyst-Runtime.git] / t / more-psgi-compat.t
diff --git a/t/more-psgi-compat.t b/t/more-psgi-compat.t
new file mode 100644 (file)
index 0000000..71dc283
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use FindBin;
+use Test::More;
+use HTTP::Request::Common;
+
+use lib "$FindBin::Bin/lib";
+use Catalyst::Test 'TestFromPSGI';
+
+{
+  ok my $response = request GET '/from_psgi_array',
+    'got welcome from a catalyst controller';
+
+  is $response->content, 'helloworldtoday',
+    'expected content body /from_psgi_array';
+}
+
+{
+  ok my $response = request GET '/from_psgi_code',
+    'got welcome from a catalyst controller';
+
+  is $response->content, 'helloworldtoday2',
+    'expected content body /from_psgi_code';
+}
+
+{
+  ok my $response = request GET '/from_psgi_code_itr',
+    'got welcome from a catalyst controller';
+
+  is $response->content, 'helloworldtoday3',
+    'expected content body /from_psgi_code_itr';
+}
+
+done_testing;