Merge 'trunk' into 'prefetch'
[dbsrgits/DBIx-Class.git] / t / 93single_accessor_object.t
index 287785f..892e656 100644 (file)
@@ -48,7 +48,7 @@ $schema = DBICTest->init_schema();
        my $artist = $schema->resultset('Artist')->create({ artistid => 666, name => 'bad religion' });
        my $cd = $schema->resultset('CD')->create({ cdid => 187, artist => 1, title => 'how could hell be any worse?', year => 1982, genreid => undef });
 
-       ok(!defined($cd->genreid), 'genreid is NULL');
+       ok(!defined($cd->get_column('genreid')), 'genreid is NULL');  #no accessor was defined for this column
        ok(!defined($cd->genre), 'genre accessor returns undef');
 }
 
@@ -56,7 +56,7 @@ $schema = DBICTest->init_schema();
 
 {
        my $artist = $schema->resultset('Artist')->create({ artistid => 666, name => 'bad religion' });
-       my $genre = $schema->resultset('Genre')->create({ name => 'disco' });
+       my $genre = $schema->resultset('Genre')->create({ genreid => 88, name => 'disco' });
        my $cd = $schema->resultset('CD')->create({ cdid => 187, artist => 1, title => 'how could hell be any worse?', year => 1982 });
 
        dies_ok { $cd->genre } 'genre accessor throws without column';