Skip to content

Commit

Permalink
Add a test for a recent regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed Jun 7, 2012
1 parent 9f34ef6 commit 8d99871
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/03-response-content.t
Expand Up @@ -2,18 +2,24 @@ use Test;
use Bailador;
use Bailador::Test;

plan 5;
plan 7;

get '/foo' => sub { "foo" }
post '/bar' => sub { "bar" }

get '/baz' => sub { { foo => "bar", baz => 5 } }

get '/params/:foo' => sub ($foo) { "a happy $foo" }
get /'/regexes/'(.+)/ => sub ($foo) { "a happy $foo" }

response-content-is 'GET', '/foo', "foo";
response-content-isnt 'GET', '/bar', "bar";

response-content-is 'POST', '/bar', "bar";
response-content-isnt 'POST', '/foo', "foo";

response-content-is 'GET', '/params/bar', 'a happy bar';
response-content-is 'GET', '/regexes/bar', 'a happy bar';

todo 'returning complex structs NYI';
response-content-is-deeply 'GET', '/baz', { foo => "bar", baz => 5 };

0 comments on commit 8d99871

Please sign in to comment.