# kill our $dbh
$schema_autorecon->storage->_dbh(undef);
- TODO: {
+ {
local $TODO = "Perl $] is known to leak like a sieve"
if DBIx::Class::_ENV_::PEEPEENESS;
# try to do something dbic-esque
$rs->create({ name => "Hardcore Forker $$" });
- TODO: {
+ {
local $TODO = "Perl $] is known to leak like a sieve"
if DBIx::Class::_ENV_::PEEPEENESS;
} 'find by arrayref (equal)';
# test inferred condition for creation
- TODO: for my $cond (
+ for my $cond (
{ -value => [3,4] },
\[ '= ?' => [arrayfield => [3, 4]] ],
) {
# http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch294.htm#993
# Oracle Database Reference 10g Release 2 (10.2)
# http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2107.htm#sthref1297
- local $TODO = "On Oracle8i all_triggers view is empty, i don't yet know why..."
+ todo_skip "On Oracle8i all_triggers view is empty, i don't yet know why...", 1
if $schema->storage->_server_info->{normalized_dbms_version} < 9;
my $schema2 = $schema->connect($dsn2, $user2, $pass2, $opt);
sub _run_blob_tests {
SKIP: {
-TODO: {
my ($schema, $opt) = @_;
my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) );
$binstr{'large'} = $binstr{'small'} x 1024;
ok (try { $objs[0]->blob }||'' eq "blob:$str", 'blob inserted/retrieved correctly');
ok (try { $objs[0]->clob }||'' eq "clob:$str", 'clob inserted/retrieved correctly');
- TODO: {
+ {
local $TODO = '-like comparison on blobs not tested before ora 10 (fails on 8i)'
if $schema->storage->_server_info->{normalized_dbms_version} < 10;
}
$schema->storage->debug ($orig_debug);
-}}
+}
do_clean ($dbh);
}
is( $lim->all, 2, 'Number of ->all objects matches count' );
# Limit with select-lock
-TODO: {
+{
local $TODO = "Seems we can't SELECT ... FOR ... on subqueries";
lives_ok {
$schema->txn_do (sub {
my $test_type = "Dialect:$dialect Quoted:$quoted";
# basic limit support
- TODO: {
+ {
my $art_rs = $schema->resultset ('Artist');
$art_rs->delete;
$art_rs->create({ name => 'Artist ' . $_ }) for (1..6);
is ($owners->page(1)->count, 3, "$test_type: has-many prefetch returns correct count");
is ($owners->page(3)->count, 2, "$test_type: has-many prefetch returns correct count");
- TODO: {
+ {
local $TODO = "Top-limit does not work when your limit ends up past the resultset"
if $dialect eq 'Top';
is ($owners->page(3)->all, 2, "$test_type: has_many prefetch returns correct number of rows");
is ($books->page(1)->count, 2, "$test_type: Prefetched grouped search returns correct count");
is ($books->page(2)->count, 1, "$test_type: Prefetched grouped search returns correct count");
- TODO: {
+ {
local $TODO = "Top-limit does not work when your limit ends up past the resultset"
if $dialect eq 'Top';
is ($books->page(2)->all, 1, "$test_type: Prefetched grouped search returns correct number of rows");
SQL
});
- TODO: {
+ {
my $freetds_and_dynamic_cursors = 1
if $opts_name eq 'use_dynamic_cursors' &&
$schema->storage->_using_freetds;
}
# test insert in an outer transaction when there's an active cursor
- TODO: {
+ {
local $TODO = 'this should work once we have eager cursors';
# clear state, or we get a deadlock on $row->delete
# bind values are always alphabetically ordered by column, thus [1]
# the single quotes are an artefact of the debug-system
-TODO: {
+{
local $TODO = "This has been broken since rev 1191, Mar 2006";
is ($bind[1], "'$bytestream_title'", 'INSERT: raw bytes sent to the database');
}
$cd->title('something_else');
ok( $cd->is_column_changed('title'), 'column is dirty after setting to something completely different');
-TODO: {
+{
local $TODO = 'There is currently no way to propagate aliases to inflate_result()';
$cd = $schema->resultset('CD')->find ({ title => $utf8_title }, { select => 'title', as => 'name' });
ok (utf8::is_utf8( $cd->get_column ('name') ), 'utf8 flag propagates via as');
$a2_cds->search ({}, { rows => 1})->delete;
is ($cdrs->count, $total_cds -= 1, 'related + limit delete ok');
-TODO: {
+{
local $TODO = 'delete_related is based on search_related which is based on search which does not understand object arguments';
local $SIG{__WARN__} = sub {}; # trap the non-numeric warning, remove when the TODO is removed
} [$dt_warn_re],
'using a DateTime object in ->search generates a warning';
-TODO: {
+{
local $TODO = "We can't do this yet before 0.09" if DBIx::Class->VERSION < 0.09;
is(eval { $row->id }, 1, 'DT in search');
};
$dbh->do("CREATE TABLE track (trackid NUMBER(12), cd NUMBER(12), position NUMBER(12), title VARCHAR(255), last_updated_on DATE, last_updated_at $timestamp_datatype)");
-TODO: {
+# TODO is in effect for the rest of the tests
local $TODO = 'FIXME - something odd is going on with Oracle < 9 datetime support'
if ($schema->storage->_server_info->{normalized_dbms_version}||0) < 9;
+
lives_ok {
# insert a row to play with
is( int $track->last_updated_at->nanosecond, int 500_000_000,
'TIMESTAMP nanoseconds survived' );
-} 'dateteime operations executed correctly' } # end of lives_ok/TODO block
+} 'dateteime operations executed correctly';
done_testing;
$fc->file({ handle => $fh, filename => $new_fname });
$fc->update;
-TODO: {
+{
local $TODO = 'design change required';
ok ( ! -e $storage, 'old storage does not exist' );
};
$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' );
-};
+}
);
-TODO: {
+{
local $TODO = "Chaining with prefetch is fundamentally broken";
my $queries;
is($rs->all, 1, 'distinct with prefetch (objects)');
is($rs->count, 1, 'distinct with prefetch (count)');
- TODO: {
$queries = 0;
$schema->storage->debugcb ($debugcb);
$schema->storage->debug (1);
is($rs->search_related('cds')->all, 2, 'prefetched distinct with prefetch (objects)');
is($rs->search_related('cds')->count, 2, 'prefetched distinct with prefetch (count)');
- local $TODO = "This makes another 2 trips to the database, it can't be right";
- is ($queries, 0, 'No extra queries fired (prefetch survives search_related)');
+ {
+ local $TODO = "This makes another 2 trips to the database, it can't be right";
+ is ($queries, 0, 'No extra queries fired (prefetch survives search_related)');
+ }
$schema->storage->debugcb (undef);
$schema->storage->debug ($orig_debug);
- }
-
}, 'distinct generally works with prefetch on deep search_related chains');
done_testing;
year => 2005,
} );
- TODO: {
+ {
local $TODO = "Can't fix right now" if $DBIx::Class::VERSION < 0.09;
lives_ok { $big_flop->genre} "Don't throw exception when col is not loaded after insert";
};
);
-TODO: {
+{
local $TODO = "relationship checking needs fixing";
# try to add a bogus relationship using the wrong cols
throws_ok {
my $rs;
-TODO: {
+{
local $TODO = 'bind args order needs fixing (semifor)';
# First, the simple cases...
->search({}, $where_bind);
is ( $rs->count, 1, 'where/bind last' );
+
+ # and the complex case
+ local $TODO = 'bind args order needs fixing (semifor)';
+ $rs = $schema->resultset('CustomSql')->search({}, { bind => [ 1999 ] })
+ ->search({ 'artistid' => 1 }, {
+ where => \'title like ?',
+ bind => [ 'Spoon%' ] });
+ is ( $rs->count, 1, '...cookbook + chained search with extra bind' );
}
{
);
}
-TODO: {
- local $TODO = 'bind args order needs fixing (semifor)';
- $rs = $schema->resultset('Complex')->search({}, { bind => [ 1999 ] })
- ->search({ 'artistid' => 1 }, {
- where => \'title like ?',
- bind => [ 'Spoon%' ] });
- is ( $rs->count, 1, '...cookbook + chained search with extra bind' );
-}
-
done_testing;
# ramifications of changing this. Thus the value override and the
# TODO to go with it. Delete all of this if ever resolved.
my %todo_rel_inflation_override = ( artist => $basecols{artist} );
-TODO: {
+{
local $TODO = 'Treating relationships as inflatable data is wrong - see comment in ' . __FILE__;
ok (! keys %todo_rel_inflation_override);
}
)
);
-TODO: {
- my $user = $schema->resultset('User')->create($user_data);
- my $admin = $schema->resultset('User')->create($admin_data);
+{
+ my $user = $schema->resultset('User')->create($user_data);
+ my $admin = $schema->resultset('User')->create($admin_data);
- is( ref $user, 'My::Schema::Result::User' );
- local $TODO = 'New objects should also be inflated';
- is( ref $admin, 'My::Schema::Result::User::Admin' );
+ is( ref $user, 'My::Schema::Result::User' );
+
+ local $TODO = 'New objects should also be inflated';
+ is( ref $admin, 'My::Schema::Result::User::Admin' );
}
my $user = $schema->resultset('User')->single($user_data);
use DBIC::SqlMakerTest;
sub test_order {
-
- TODO: {
my $rs = shift;
my $args = shift;
],
) || diag Dumper $args->{order_by};
};
- }
}
my @tests = (
ok( -d $test_dir_1, 'create_ddl_dir did a make_path on its target dir' );
ok( scalar( glob $test_dir_1.'/*.sql' ), 'there are sql files in there' );
-TODO: {
- local $TODO = 'we should probably add some tests here for actual deployability of the DDL?';
- ok( 0 );
+{
+ local $TODO = 'we should probably add some tests here for actual deployability of the DDL?';
+ ok( 0 );
}
END {