-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List and load prerequisites. create database for testing
- Loading branch information
Showing
5 changed files
with
66 additions
and
8 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
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
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
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,40 @@ | |||
use Test::More; | |||
use strict; | |||
use warnings; | |||
|
|||
use Cwd qw(abs_path); | |||
use File::Basename qw(dirname); | |||
|
|||
plan tests => 2; | |||
|
|||
|
|||
my $root = dirname dirname abs_path($0); | |||
#diag $root; | |||
|
|||
#use Dancer qw(config); | |||
#use Dwimmer; | |||
#diag config->{appdir}; | |||
|
|||
my $password = 'dwimmer'; | |||
|
|||
# TODO do this in a temporary directory! | |||
mkdir "$root/db"; | |||
unlink "$root/db/dwimmer.db"; | |||
system "$^X script/dwimmer_setup.pl --root $root --email test\@dwimmer.org --password $password"; | |||
|
|||
|
|||
use Dwimmer; | |||
use Dancer::Test; | |||
|
|||
{ | |||
my $r = dancer_response GET => '/'; | |||
is $r->{status}, 200, '/ ok'; | |||
like $r->{content}, qr{/login}, '/login'; | |||
} | |||
|
|||
# { | |||
# my $r = dancer_response POST => '/login', username => 'admin', password => $password; | |||
# } | |||
|
|||
|
|||
|