Dancer2-Session-Redis
view release on metacpan or search on metacpan
t/001-use.t view on Meta::CPAN
use strictures 1;
use Test::More tests => 1 + 2;
use Test::NoWarnings;
use Plack::Test;
use HTTP::Request::Common;
use t::Util;
BEGIN { t::Util::setenv }
use t::TestApp::Simple;
BEGIN { t::Util::setconf( \&t::TestApp::Simple::set ) }
############################################################################
my $app = t::TestApp::Simple->psgi_app;
ok( $app, 'Got App' );
t/002-get-set.t view on Meta::CPAN
use strictures 1;
use Test::More tests => 1 + 6;
use Test::NoWarnings;
use Plack::Test;
use HTTP::Request::Common;
use t::Util;
BEGIN { t::Util::setenv }
use t::TestApp::Simple;
BEGIN { t::Util::setconf( \&t::TestApp::Simple::set ) }
############################################################################
my $app = t::TestApp::Simple->psgi_app;
ok( $app, 'Got App' );
t/003-get-set-redis.t view on Meta::CPAN
use Plack::Test;
use HTTP::Request::Common;
use t::Util;
BEGIN {
eval 'use Sereal::Decoder;1'
or plan skip_all => "Sereal::Decoder needed to run these tests";
eval 'use Sereal::Encoder;1'
or plan skip_all => "Sereal::Encoder needed to run these tests";
t::Util::setenv;
$ENV{DANCER_SESSION_REDIS_TEST_MOCK} = 0;
}
use t::TestApp::Simple;
BEGIN {
t::Util::setconf( \&t::TestApp::Simple::set )
or plan( skip_all => "Redis server not found so tests cannot be run" );
}
use Plack::Test;
use HTTP::Request::Common;
use HTTP::Cookies;
use Redis;
my $jar = HTTP::Cookies->new;
############################################################################
# Setup environment for Delti::WheelShop testing environment.
sub setenv {
$ENV{PLACK_ENV} = $ENV{DANCER_ENVIRONMENT} = 'testing';
$ENV{DANCER_SESSION_REDIS_TEST_MOCK} = 1;
}
############################################################################
# Setup environment for Delti::WheelShop testing environment.
sub setconf {
my ($set) = @_;
$set->( environment => 'testing' );
( run in 0.444 second using v1.01-cache-2.11-cpan-3989ada0592 )