X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F93storage_replication.t;fp=t%2F93storage_replication.t;h=7b70b94f4a58c45764b0ba180e1e6555118b84f8;hb=9c169362528768554474ce1018a698ac0cbcd50f;hp=65c236e9468b8bc7f6c228ec4fa63a3bf2b61466;hpb=846e17a679e91078d7c7fd3a2f0ca80749dc5d34;p=dbsrgits%2FDBIx-Class.git diff --git a/t/93storage_replication.t b/t/93storage_replication.t index 65c236e..7b70b94 100644 --- a/t/93storage_replication.t +++ b/t/93storage_replication.t @@ -13,7 +13,7 @@ BEGIN { eval "use DBIx::Class::Storage::DBI::Replicated; use Test::Moose"; plan $@ ? ( skip_all => "Deps not installed: $@" ) - : ( tests => 126 ); + : ( tests => 130 ); } use_ok 'DBIx::Class::Storage::DBI::Replicated::Pool'; @@ -761,10 +761,19 @@ is $debug{storage_type}, 'REPLICANT', "got last query from a replicant: $debug{d is $debug{storage_type}, 'REPLICANT', "got last query from a replicant: $debug{dsn}"; ok $artist->get_from_storage({force_pool=>'master'}) - => 'properly discard changes'; + => 'properly called get_from_storage against master (manual attrs)'; is $debug{storage_type}, 'MASTER', "got last query from a master: $debug{dsn}"; + ok $artist->discard_changes({force_pool=>'master'}) + => 'properly alled discard_changes against master (manual attrs)'; + + is $debug{storage_type}, 'MASTER', "got last query from a master: $debug{dsn}"; + + ok $artist->discard_changes() + => 'properly alled discard_changes against master (default attrs)'; + + is $debug{storage_type}, 'MASTER', "got last query from a master: $debug{dsn}" } ## Test some edge cases, like trying to do a transaction inside a transaction, etc