summaryrefslogtreecommitdiff
path: root/t/10_mx_net_api_test.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2009-12-04 09:52:26 +0100
committerfranck cuny <franck@lumberjaph.net>2009-12-04 09:52:26 +0100
commitb85f601bdcfc50fd6223048f3c07ba29cbd56346 (patch)
treeea60d77c6ca034f60e10988d21bc851fbc55de1f /t/10_mx_net_api_test.t
parentadd a catalyst app to tests (diff)
downloadnet-http-api-b85f601bdcfc50fd6223048f3c07ba29cbd56346.tar.gz
small updates to tests
Diffstat (limited to '')
-rw-r--r--t/10_mx_net_api_test.t43
1 files changed, 43 insertions, 0 deletions
diff --git a/t/10_mx_net_api_test.t b/t/10_mx_net_api_test.t
new file mode 100644
index 0000000..96bf2be
--- /dev/null
+++ b/t/10_mx_net_api_test.t
@@ -0,0 +1,43 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN {
+ plan skip_all => 'requires Catalyst::Action::REST'
+ unless eval { require Catalyst::Action::REST };
+}
+
+{
+
+ package catalysttestapi;
+ use Moose;
+ use MooseX::Net::API::Test;
+
+ test_api_declare 'TestAPI' => (
+ catalyst => 1,
+ catalyst_app_name => 'TestApp'
+ );
+
+ test_api_method foo => (
+ tests => {
+ simple => [
+ {
+ # pouvoir surcharger
+ test => 'is_deeply',
+ expected => { status => 1 }
+ },
+ 'ok',
+ ]
+ }
+ );
+}
+
+#content_like => [ { expected => qr/status: 1/ }, ],
+#action_ok => [],
+#action_redirect => [],
+#action_notfound => [],
+#contenttype_is => [],
+
+catalysttestapi->run();
+
+done_testing;