Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / schema / clone.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7
8 use DBICTest;
9
10 my $schema = DBICTest->init_schema();
11
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
28
29 done_testing;