X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F96file_column.t;h=f4a166fe9db856abc78cf8dd0b543d16181805d2;hb=d35a6fedb511b76dc5406f8ec5ced9daf84423cd;hp=d1984254c59a9bc2187a3c866dd48e157206e980;hpb=26ddc864d0c6b21a64c1c390f4c4b5e031aed2b2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/96file_column.t b/t/96file_column.t index d198425..f4a166f 100644 --- a/t/96file_column.t +++ b/t/96file_column.t @@ -10,7 +10,7 @@ use Path::Class qw/file/; my $schema = DBICTest->init_schema(); -plan tests => 9; +plan tests => 10; my $rs = $schema->resultset('FileColumn'); my $fname = '96file_column.t'; @@ -65,3 +65,21 @@ ok ( compare($new_storage, $new_source_file) == 0, 'new content matches' ); $fc->delete; ok ( ! -e $storage, 'storage deleted' ); + +$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}, +); + +TODO: { + local $TODO = 'need resultset delete override to delete_all'; + $rs->delete; + ok ( ! -e $storage, 'storage does not exist after $rs->delete' ); +};