Fix failures and protect the suite from spurious VERSION-related warnings
[dbsrgits/DBIx-Class.git] / t / schema / clone.t
CommitLineData
f30e8593 1use strict;
2use warnings;
3use Test::More;
4
5use lib qw(t/lib);
6use DBICTest;
7
8my $schema = DBICTest->init_schema();
9
71829446 10{
11 my $clone = $schema->clone;
12 cmp_ok ($clone->storage, 'eq', $schema->storage, 'Storage copied into new schema (not a new instance)');
13}
14
15{
16 is $schema->custom_attr, undef;
17 my $clone = $schema->clone(custom_attr => 'moo');
18 is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
19}
20
21{
22 my $clone = $schema->clone({ custom_attr => 'moo' });
23 is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
24}
25
f30e8593 26
27done_testing;