Skip to content

Commit

Permalink
Added basic tests for user admin routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Feb 3, 2014
1 parent 4c88009 commit 77de341
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/003_user_admin.t
@@ -0,0 +1,23 @@
use Test::More;
use strict;
use warnings;

use lib 'lib';

# the order is important
use Lystyng;
use Dancer::Test;

my %route = (
register => 200,
login => 200,
logout => 302,
);

for (keys %route) {
route_exists [ GET => "/$_" ], "a get route handler is defined for /$_";
response_status_is ['GET' => "/$_"], $route{$_},
"response status is $route{$_} for /$_";
}

done_testing;

0 comments on commit 77de341

Please sign in to comment.