Use prepared statement from the start for populate on PostgreSQL
[dbsrgits/DBIx-Class.git] / t / schema / clone.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
f30e8593 3use strict;
4use warnings;
5use Test::More;
6
c0329273 7
f30e8593 8use DBICTest;
9
10my $schema = DBICTest->init_schema();
11
71829446 12{
13 my $clone = $schema->clone;
14 cmp_ok ($clone->storage, 'eq', $schema->storage, 'Storage copied into new schema (not a new instance)');
15}
16
17{
18 is $schema->custom_attr, undef;
19 my $clone = $schema->clone(custom_attr => 'moo');
20 is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
21}
22
23{
24 my $clone = $schema->clone({ custom_attr => 'moo' });
25 is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
26}
27
f30e8593 28
29done_testing;