summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/lib/TestAPI.pm19
-rw-r--r--t/lib/TestApp.pm11
-rw-r--r--t/lib/TestApp/Controller/Root.pm16
3 files changed, 46 insertions, 0 deletions
diff --git a/t/lib/TestAPI.pm b/t/lib/TestAPI.pm
new file mode 100644
index 0000000..1f58351
--- /dev/null
+++ b/t/lib/TestAPI.pm
@@ -0,0 +1,19 @@
+package TestAPI;
+use Moose;
+use MooseX::Net::API;
+
+net_api_declare fake_api => (
+ base_url => 'http://localhost/root',
+ format => 'json',
+ format_mode => 'content-type',
+ require_authentication => 0,
+);
+
+net_api_method foo => (
+ description => 'this does foo',
+ method => 'GET',
+ path => '/foo/',
+);
+
+1;
+
diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm
new file mode 100644
index 0000000..69ec93d
--- /dev/null
+++ b/t/lib/TestApp.pm
@@ -0,0 +1,11 @@
+package TestApp;
+use strict;
+use warnings;
+
+use Catalyst;
+
+__PACKAGE__->config( name => 'TestApp', );
+
+__PACKAGE__->setup;
+
+1;
diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm
new file mode 100644
index 0000000..7ea3f25
--- /dev/null
+++ b/t/lib/TestApp/Controller/Root.pm
@@ -0,0 +1,16 @@
+package TestApp::Controller::Root;
+
+use strict;
+use warnings;
+use base qw/Catalyst::Controller::REST/;
+
+sub foo : Local : ActionClass('REST') {
+ my ( $self, $c ) = @_;
+}
+
+sub foo_GET {
+ my ( $self, $c ) = @_;
+ $self->status_ok( $c, entity => { status => 1 } );
+}
+
+1;