Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from joshrabinowitz/moretests
simple test using simple_crud()
- Loading branch information
Showing
3 changed files
with
34 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
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,21 @@ | ||
#!perl | ||
|
||
use Test::More; | ||
|
||
use Dancer qw(:syntax :tests); | ||
use Dancer::Test; | ||
use File::Temp; | ||
|
||
use FindBin qw($Bin); | ||
use lib "$Bin/lib"; # | ||
my $filename = File::Temp->new(UNLINK=>1); # will be automatically unlinked. Set to 0 to keep. | ||
|
||
config->{plugins}{Database}{driver} = "CSV"; | ||
config->{plugins}{Database}{database} = $filename; | ||
use_ok( 'TestCRUD' ) || die "Can't load test module TestCRUD"; | ||
|
||
route_exists [ GET => '/test_table' ]; | ||
|
||
done_testing(); | ||
|
||
|
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,12 @@ | ||
package TestCRUD; | ||
use Dancer ':syntax'; | ||
|
||
our $VERSION = '0.01'; | ||
|
||
use Dancer::Plugin::SimpleCRUD; | ||
|
||
simple_crud( | ||
prefix => "/test_table", | ||
db_table => "test_table", | ||
); | ||
|