[Bast-commits] r7621 - in DBIx-Class/0.08/trunk/t: .
lib/DBICTest/Schema
mo at dev.catalyst.perl.org
mo at dev.catalyst.perl.org
Thu Sep 10 16:53:33 GMT 2009
Author: mo
Date: 2009-09-10 16:53:32 +0000 (Thu, 10 Sep 2009)
New Revision: 7621
Modified:
DBIx-Class/0.08/trunk/t/60core.t
DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Artist.pm
Log:
added test to make sure that store_column is called even for non-dirty columns
Modified: DBIx-Class/0.08/trunk/t/60core.t
===================================================================
--- DBIx-Class/0.08/trunk/t/60core.t 2009-09-10 16:25:01 UTC (rev 7620)
+++ DBIx-Class/0.08/trunk/t/60core.t 2009-09-10 16:53:32 UTC (rev 7621)
@@ -108,6 +108,10 @@
{
ok(my $artist = $schema->resultset('Artist')->create({name => 'store_column test'}));
is($artist->name, 'X store_column test'); # used to be 'X X store...'
+
+ # call store_column even though the column doesn't seem to be dirty
+ ok($artist->update({name => 'X store_column test'}));
+ is($artist->name, 'X X store_column test');
$artist->delete;
}
Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Artist.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Artist.pm 2009-09-10 16:25:01 UTC (rev 7620)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Artist.pm 2009-09-10 16:53:32 UTC (rev 7621)
@@ -71,7 +71,7 @@
sub store_column {
my ($self, $name, $value) = @_;
- $value = 'X '.$value if ($name eq 'name' && $value && $value =~ /store_column test/);
+ $value = 'X '.$value if ($name eq 'name' && $value && $value =~ /(X )?store_column test/);
$self->next::method($name, $value);
}
More information about the Bast-commits
mailing list