[Bast-commits] r4791 - DBIx-Class/0.08/trunk/t
semifor at dev.catalyst.perl.org
semifor at dev.catalyst.perl.org
Sun Aug 31 02:55:17 BST 2008
Author: semifor
Date: 2008-08-31 02:55:17 +0100 (Sun, 31 Aug 2008)
New Revision: 4791
Modified:
DBIx-Class/0.08/trunk/t/96file_column.t
Log:
Adedd TODO test demonstrating $rs->delete failure for file_columns.
Modified: DBIx-Class/0.08/trunk/t/96file_column.t
===================================================================
--- DBIx-Class/0.08/trunk/t/96file_column.t 2008-08-29 13:18:39 UTC (rev 4790)
+++ DBIx-Class/0.08/trunk/t/96file_column.t 2008-08-31 01:55:17 UTC (rev 4791)
@@ -10,7 +10,7 @@
my $schema = DBICTest->init_schema();
-plan tests => 9;
+plan tests => 11;
my $rs = $schema->resultset('FileColumn');
my $fname = '96file_column.t';
@@ -65,3 +65,23 @@
$fc->delete;
ok ( ! -e $storage, 'storage deleted' );
+
+TODO: {
+ local $TODO = 'need resultset delete override to delete_all';
+
+ $fh = $source_file->openr or die "failed to open $source_file: $!\n";
+ $fc = $rs->create({ file => { handle => $fh, filename => $fname } });
+
+ # read it back
+ $fc->discard_changes;
+
+ $storage = file(
+ $fc->column_info('file')->{file_column_path},
+ $fc->id,
+ $fc->file->{filename},
+ );
+ ok ( -e $storage, 'storage exists (2)' );
+
+ $rs->delete;
+ ok ( ! -e $storage, 'storage does not exist after $rs->delete' );
+};
More information about the Bast-commits
mailing list