use strict;
+use warnings;
+
use Test::More;
use IO::File;
eval "use DBD::SQLite";
plan $@
? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 7 );
+ : ( tests => 6 );
}
use lib qw(t/lib);
use_ok('DBICTest');
-
-use_ok('DBICTest::HelperRels');
+DBICTest::init_schema();
DBICTest->schema->storage->sql_maker->quote_char("'");
DBICTest->schema->storage->sql_maker->name_sep('.');
eval "use DBD::SQLite";
plan $@
? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 13 );
+ : ( tests => 12 );
}
use lib qw(t/lib);
use_ok('DBICTest');
-use_ok('DBICTest::HelperRels');
+DBICTest::init_schema();
my $cbworks = 0;
#warn "$dsn $user $pass";
-plan skip_all, 'Set $ENV{DBICTEST_DB2_DSN}, _USER and _PASS to run this test'
+plan skip_all => 'Set $ENV{DBICTEST_DB2_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
plan tests => 6;
# Probably best to pass the DBQ option in the DSN to specify a specific
# libray. Something like:
# DBICTEST_DB2_400_DSN='dbi:ODBC:dsn=MyAS400;DBQ=MYLIB'
-plan skip_all, 'Set $ENV{DBICTEST_DB2_400_DSN}, _USER and _PASS to run this test'
+plan skip_all => 'Set $ENV{DBICTEST_DB2_400_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
plan tests => 6;
plan tests => 4;
-$schema->compose_connection( 'MSSQLTest' => $dsn, $user, $pass );
+DBICTest::Schema->compose_connection( 'MSSQLTest' => $dsn, $user, $pass );
my $dbh = MSSQLTest->schema->storage->dbh;
my $schema = DBICTest::init_schema();
eval 'use Data::UUID ; 1'
- or plan skip_all, 'Install Data::UUID run this test';
+ or plan skip_all => 'Install Data::UUID run this test';
plan tests => 1;
DBICTest::Schema::Artist->load_components('UUIDColumns');
# Force txn_rollback() to throw an exception
no warnings 'redefine';
+ no strict 'refs';
local *{"DBIx::Class::Schema::txn_rollback"} = sub{die 'FAILED'};
eval {
is( scalar @{$rs->get_cache}, 2, 'set_cache() is functional' );
-$cd = $schema->resultset('CD')->find(1);
+my $cd = $schema->resultset('CD')->find(1);
$rs->clear_cache;
# do not taunt happy dave ball
-my $schema = DBICTest::Schema;
+my $schema = 'DBICTest::Schema';
plan tests => 33;
return 0;
}
+my( $ondel, $onupd );
+
sub check_unique {
my ($selftable, $selfcol) = @_;
my $employee;
my $count = $rs->count();
my $position_column = $rs->result_class->position_column();
+ my $row;
foreach my $position (1..$count) {
plan tests => 5;
+my $cd;
my $rs = $cd = $schema->resultset("CD")->search({});
my $rs_title = $rs->get_column('title');
use lib 't/lib';
-use_ok('DBICTest::HelperRels');
+use_ok('DBICTest');
+DBICTest::init_schema();
DBICTest::CD->load_components(qw/CDBICompat::Pager/);