File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ BEGIN { eval { require Digest::SHA; 1 } or plan skip_all => 'requires Digest::SH
1212
1313BEGIN { DodTestUtil-> check_driver }
1414
15- plan tests => 3 ;
15+ plan tests => 5 ;
1616
1717setup_dbs({
1818 global => [ qw( wines ) ],
@@ -40,7 +40,13 @@ $wine = Wine->lookup($wine_id);
4040ok $wine ;
4141ok $wine -> content eq $binary ;
4242
43- # TODO: bulk_insert doesn't support blob yet. We need to change some of its API so that we can call column_def in each dbd's bulk_insert
43+ my @names = qw( Margaux Latour) ;
44+ Wine-> bulk_insert([qw( name content) ], [ map {[$_ , Digest::SHA::sha1($_ )]} @names ]);
45+
46+ for my $name (@names ) {
47+ my ($found ) = Wine-> search({name => $name });
48+ ok $found -> content eq Digest::SHA::sha1($name );
49+ }
4450
4551disconnect_all($wine );
4652teardown_dbs(qw( global ) );
You can’t perform that action at this time.
0 commit comments