Expand notabs/eol testing to .pod and some files at the root
[dbsrgits/DBIx-Class.git] / t / schema / clone.t
index 4ce817f..86b7a47 100644 (file)
@@ -7,10 +7,21 @@ use DBICTest;
 
 my $schema = DBICTest->init_schema();
 
-ok ($schema->storage->connected, 'initialized schema connected');
+{
+  my $clone = $schema->clone;
+  cmp_ok ($clone->storage, 'eq', $schema->storage, 'Storage copied into new schema (not a new instance)');
+}
+
+{
+  is $schema->custom_attr, undef;
+  my $clone = $schema->clone(custom_attr => 'moo');
+  is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
+}
+
+{
+  my $clone = $schema->clone({ custom_attr => 'moo' });
+  is $clone->custom_attr, 'moo', 'cloning can change existing attrs';
+}
 
-my $clone = $schema->clone;
-ok (!$clone->storage->connected, 'The clone storage is not connected');
-cmp_ok ($clone->storage, 'ne', $schema->storage, 'Storage cloned with schema');
 
 done_testing;