Move the testapp out of the main directory and under t/, avoiding the need for a...
[catagits/Catalyst-Engine-STOMP.git] / t / lib / StompTestApp / Controller / TestJsonController.pm
diff --git a/t/lib/StompTestApp/Controller/TestJsonController.pm b/t/lib/StompTestApp/Controller/TestJsonController.pm
new file mode 100644 (file)
index 0000000..daf9ffb
--- /dev/null
@@ -0,0 +1,18 @@
+package # Hide from PAUSE
+  StompTestApp::Controller::TestJsonController;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller::MessageDriven' };
+
+__PACKAGE__->config( serializer => 'JSON' );
+
+sub testaction : Local {
+    my ($self, $c, $request) = @_;
+
+    # Reply with a minimal response message
+    my $response = { type => 'testaction_response' };
+    $c->stash->{response} = $response;
+}
+
+1;