|
Lines 68-74
subtest 'Basic object tests' => sub {
Link Here
|
| 68 |
}; |
68 |
}; |
| 69 |
|
69 |
|
| 70 |
subtest 'DBIx::Class::Ordered tests' => sub { |
70 |
subtest 'DBIx::Class::Ordered tests' => sub { |
| 71 |
plan tests => 33; |
71 |
plan tests => 34; |
| 72 |
|
72 |
|
| 73 |
$schema->storage->txn_begin; |
73 |
$schema->storage->txn_begin; |
| 74 |
|
74 |
|
|
Lines 157-162
subtest 'DBIx::Class::Ordered tests' => sub {
Link Here
|
| 157 |
is( $srstage->previous_sibling->stage_id, $stageprevious->{stage_id}, "Move, correct previous." ); |
157 |
is( $srstage->previous_sibling->stage_id, $stageprevious->{stage_id}, "Move, correct previous." ); |
| 158 |
is( $srstage->next_sibling->stage_id, $stagenext->{stage_id}, "Move, correct next." ); |
158 |
is( $srstage->next_sibling->stage_id, $stagenext->{stage_id}, "Move, correct next." ); |
| 159 |
|
159 |
|
|
|
160 |
for ( my $i = 6 ; $i < 20 ; $i++ ) { |
| 161 |
$builder->build( |
| 162 |
{ |
| 163 |
source => 'Stockrotationstage', |
| 164 |
value => { rota_id => $rota->{rota_id}, position => $i } |
| 165 |
} |
| 166 |
); |
| 167 |
} |
| 168 |
|
| 169 |
# 4 <= 20 = true, but 4 le 20 = false |
| 170 |
ok( $srstage->move_to(4), "Moved." ); |
| 171 |
|
| 160 |
# Group manipulation |
172 |
# Group manipulation |
| 161 |
my $newrota = $builder->build( { source => 'Stockrotationrota' } ); |
173 |
my $newrota = $builder->build( { source => 'Stockrotationrota' } ); |
| 162 |
ok( $srstage->move_to_group( $newrota->{rota_id} ), "Move to Group." ); |
174 |
ok( $srstage->move_to_group( $newrota->{rota_id} ), "Move to Group." ); |
| 163 |
- |
|
|