Skip to content

Commit

Permalink
Skip session test if there is no session middleware installed
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrtj committed Jun 18, 2024
1 parent 2645f58 commit d99e9fe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion t/request_session.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ use Kelp::Test;
use Kelp;
use Test::More;
use HTTP::Request::Common;
use Plack::Middleware::Session;

my $has_session = eval {
require Plack::Middleware::Session;
1;
};

plan skip_all => 'These tests require Plack::Middleware::Session'
unless $has_session;

my $app = Kelp->new(
mode => 'test',
Expand Down Expand Up @@ -49,3 +56,4 @@ $t->request( GET '/session' )
->content_is('All OK');

done_testing;

0 comments on commit d99e9fe

Please sign in to comment.