Skip to content

Commit

Permalink
Remove TODO on fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Jan 15, 2016
1 parent 54d175c commit aa7ed91
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions t/005_private_urls.t
Expand Up @@ -15,6 +15,7 @@ my $jar = HTTP::Cookies->new;
my $app = Lystyng->to_app;
my $test = Plack::Test->create($app);

my $url = 'http://localhost';
my %routes = (
'list/add' => {
out => {
Expand All @@ -40,23 +41,20 @@ my $user = $sch->resultset('User')->create({
password => 'TEST',
});

my $res = $test->request(POST '/login', [
my $res = $test->request(POST "$url/login", [
username => $user->username,
password => 'TEST',
]);

$jar->extract_cookies($res);

TODO: {
local $TODO = "Haven't got the cookie handling working yet";
test_routes(\%routes, 'in');
}
test_routes(\%routes, 'in');

sub test_routes {
my ($routes, $state) = @_;

for (keys %$routes) {
my $req = GET "/$_";
my $req = GET "$url/$_";
$jar->add_cookie_header($req);
my $res = $test->request( $req );
is $res->code, $routes->{$_}{$state}{code},
Expand Down

0 comments on commit aa7ed91

Please sign in to comment.