Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added basic tests for user admin routes.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |