Cleanup shebang lines of all maint/example scripts, remove from tests entirely
[dbsrgits/DBIx-Class.git] / t / storage / disable_sth_caching.t
CommitLineData
b33697ef 1use strict;
f54428ab 2use warnings;
b33697ef 3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
8plan tests => 2;
9
10# Set up the "usual" sqlite for DBICTest
11my $schema = DBICTest->init_schema;
12
13my $sth_one = $schema->storage->sth('SELECT 42');
14my $sth_two = $schema->storage->sth('SELECT 42');
15$schema->storage->disable_sth_caching(1);
16my $sth_three = $schema->storage->sth('SELECT 42');
17
18ok($sth_one == $sth_two, "statement caching works");
19ok($sth_two != $sth_three, "disabling statement caching works");