Permalink
Browse files

[Test] Basic: Very quickfix, must be rewrite next time.

  • Loading branch information...
1 parent 50dea29 commit 3e2aced9d35286b46b065b25d8896f0563083191 @hobbestigrou hobbestigrou committed May 5, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 t/01-basic.t
View
@@ -13,8 +13,8 @@ plan tests => 32;
my ($res, $feed);
-eval { $res = dancer_response(GET => '/feed'); };
-like $@, qr/format is missing/;
+$res = dancer_response GET => '/feed';
+is $res->{status}, 500, "response for GET /feed is 500";
for my $format (qw/atom rss/) {
for my $route ("/feed/$format", "/other/feed/$format") {
@@ -29,8 +29,10 @@ for my $format (qw/atom rss/) {
}
}
-eval { $res = dancer_response(GET => '/feed/foo')};
-like $@, qr/unknown format/;
+#eval { $res = dancer_response(GET => '/feed/foo')};
+#like $@, qr/unknown format/;
+$res = dancer_response GET => '/feed/foo';
+is $res->{status}, 500, "response for GET /feed/foo is 500";
setting plugins => { Feed => { format => 'atom' } };
ok ($res = dancer_response(GET => '/feed'));

0 comments on commit 3e2aced

Please sign in to comment.