[libdancer-plugin-rest-perl] 27/63: t/03_resource.t: test resource when not given 4 hooks
Jonas Smedegaard
dr at jones.dk
Wed Jul 2 11:44:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag 0.07
in repository libdancer-plugin-rest-perl.
commit d06fb1184db2ec39acc1d72725a1a4796b3b6d1a
Author: Alexis Sukrieh <sukria at sukria.net>
Date: Thu Oct 14 10:49:30 2010 +0200
t/03_resource.t: test resource when not given 4 hooks
---
t/03_resource.t | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/03_resource.t b/t/03_resource.t
index f6a25e8..f90c700 100644
--- a/t/03_resource.t
+++ b/t/03_resource.t
@@ -3,12 +3,13 @@ use warnings;
use Dancer::ModuleLoader;
use Test::More import => ['!pass'];
-plan tests => 7;
+plan tests => 8;
{
package Webservice;
use Dancer;
use Dancer::Plugin::REST;
+ use Test::More import => ['!pass'];
resource user =>
'get' => \&on_get_user,
@@ -48,6 +49,10 @@ plan tests => 7;
$users->{$id} = { %$user, %{params('body')} };
{ user => $users->{$id} };
}
+
+ eval { resource failure => get => sub { 'GET' } };
+ like $@, qr{resource should be given with triggers},
+ "resource must have 4 hooks";
}
use lib 't';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdancer-plugin-rest-perl.git
More information about the Pkg-perl-cvs-commits
mailing list