[Bast-commits] r7232 -
DBIx-Class/0.08/branches/discard_changes_replication_fix/t
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Wed Aug 5 15:58:44 GMT 2009
Author: jnapiorkowski
Date: 2009-08-05 15:58:44 +0000 (Wed, 05 Aug 2009)
New Revision: 7232
Modified:
DBIx-Class/0.08/branches/discard_changes_replication_fix/t/93storage_replication.t
Log:
added test to make sure you can override the default attributes to discard_changes
Modified: DBIx-Class/0.08/branches/discard_changes_replication_fix/t/93storage_replication.t
===================================================================
--- DBIx-Class/0.08/branches/discard_changes_replication_fix/t/93storage_replication.t 2009-08-05 15:03:46 UTC (rev 7231)
+++ DBIx-Class/0.08/branches/discard_changes_replication_fix/t/93storage_replication.t 2009-08-05 15:58:44 UTC (rev 7232)
@@ -13,7 +13,7 @@
eval "use DBIx::Class::Storage::DBI::Replicated; use Test::Moose";
plan $@
? ( skip_all => "Deps not installed: $@" )
- : ( tests => 130 );
+ : ( tests => 132 );
}
use_ok 'DBIx::Class::Storage::DBI::Replicated::Pool';
@@ -773,7 +773,12 @@
ok $artist->discard_changes()
=> 'properly called discard_changes against master (default attrs)';
- is $debug{storage_type}, 'MASTER', "got last query from a master: $debug{dsn}"
+ is $debug{storage_type}, 'MASTER', "got last query from a master: $debug{dsn}";
+
+ ok $artist->discard_changes({force_pool=>$replicant_names[0]})
+ => 'properly able to override the default attributes';
+
+ is $debug{storage_type}, 'REPLICANT', "got last query from a replicant: $debug{dsn}"
}
## Test some edge cases, like trying to do a transaction inside a transaction, etc
More information about the Bast-commits
mailing list