fix and regression test for RT #62642
[dbsrgits/DBIx-Class.git] / t / storage / disable_sth_caching.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use lib qw(t/lib);
6 use DBICTest;
7
8 plan tests => 2;
9
10 # Set up the "usual" sqlite for DBICTest
11 my $schema = DBICTest->init_schema;
12
13 my $sth_one = $schema->storage->sth('SELECT 42');
14 my $sth_two = $schema->storage->sth('SELECT 42');
15 $schema->storage->disable_sth_caching(1);
16 my $sth_three = $schema->storage->sth('SELECT 42');
17
18 ok($sth_one == $sth_two, "statement caching works");
19 ok($sth_two != $sth_three, "disabling statement caching works");