Catalyst-Plugin-Session

 view release on metacpan or  search on metacpan

t/cat_test.t  view on Meta::CPAN

use strict;
use warnings;

use Test::Needs {
  'Catalyst::Plugin::Authentication'          => '0',
  'Catalyst::Plugin::Session::State::Cookie'  => '0.03',
};

use Test::More;

use HTTP::Request::Common;

use lib "t/lib";

use Catalyst::Test 'SessionTestApp';
my $res;

$res = request(POST 'http://localhost/login', [username => 'bob', password => 's00p3r', remember => 1]);
is($res->code, 200, 'succeeded');
my $cookie = $res->header('Set-Cookie');
ok($cookie, 'Have a cookie');

t/lib/MiniUA.pm  view on Meta::CPAN

package MiniUA;
use strict;
use warnings;
use Plack::Test ();
use HTTP::Cookies;
use HTTP::Request::Common;

sub new {
  my ($class, $app, $opts) = @_;
  my $psgi
    = ref $app eq 'CODE' ? $app
    : do {
      eval "require $app;" or die $@;
      $app->psgi_app;
    };
  $opts ||= {};



( run in 0.628 second using v1.01-cache-2.11-cpan-de7293f3b23 )