X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F87ordered.t;h=9ca9c2e69a0818ac5a071f90db717b6164edec73;hb=78c9596c362a29bf8ec2a27924c708f9e161936d;hp=1d9f17a21c6d26cd6b4871fd975bc4b05fdc138a;hpb=8f5357074109c0b803f1565921cb13f85449d8d1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/87ordered.t b/t/87ordered.t index 1d9f17a..9ca9c2e 100644 --- a/t/87ordered.t +++ b/t/87ordered.t @@ -10,8 +10,6 @@ use POSIX qw(ceil); my $schema = DBICTest->init_schema(); -plan tests => 1269; - my $employees = $schema->resultset('Employee'); $employees->delete(); @@ -42,11 +40,9 @@ foreach my $group_id (1..4) { my $group_3 = $employees->search({group_id=>3}); my $to_group = 1; my $to_pos = undef; -# now that we have transactions we need to work around stupid sqlite { my @empl = $group_3->all; while (my $employee = shift @empl) { - $employee->discard_changes; # since we are effective shift()ing the $rs while doing this $employee->move_to_group($to_group, $to_pos); $to_pos++; $to_group = $to_group==1 ? 2 : 1; @@ -54,7 +50,6 @@ my $to_pos = undef; } foreach my $group_id (1..4) { my $group_employees = $employees->search({group_id=>$group_id}); - $group_employees->all(); ok( check_rs($group_employees), "group positions after move_to_group" ); } @@ -129,7 +124,6 @@ my $to_group_2_base = 7; my $to_group_2 = 1; $to_pos = undef; -# now that we have transactions we need to work around stupid sqlite { my @empl = $group_3->all; while (my $employee = shift @empl) { @@ -143,7 +137,6 @@ $to_pos = undef; foreach my $group_id_2 (1..4) { foreach my $group_id_3 (1..4) { my $group_employees = $employees->search({group_id_2=>$group_id_2,group_id_3=>$group_id_3}); - $group_employees->all(); ok( check_rs($group_employees), "group positions after move_to_group" ); } } @@ -275,3 +268,4 @@ sub check_rs { return 1; } +done_testing;