Fixed :Path() empty brackets attribute not registering action.
[catagits/Catalyst-Runtime.git] / t / path_action_empty_brackets.t
diff --git a/t/path_action_empty_brackets.t b/t/path_action_empty_brackets.t
new file mode 100644 (file)
index 0000000..415f121
--- /dev/null
@@ -0,0 +1,27 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 9;
+use Catalyst::Test 'TestPath';
+
+
+{
+    ok( my $response = request('http://localhost/one'), 'Request' );
+    ok( $response->is_success, '"Path" - Response Successful 2xx' );
+    is( $response->content, 'OK', '"Path" - Body okay' );
+}
+{
+    ok( my $response = request('http://localhost/two'), 'Request' );
+    ok( $response->is_success, '"Path()" - Response Successful 2xx' );
+    is( $response->content, 'OK', '"Path()" - Body okay' );
+}
+{
+    ok( my $response = request('http://localhost/three'), 'Request' );
+    ok( $response->is_success, '"Path(\'\')" - Response Successful 2xx' );
+    is( $response->content, 'OK', '"Path(\'\')" - Body okay' );
+}
+
+