10 |
|
|
11 |
use Jifty::Test tests => 11; |
use Jifty::Test tests => 11; |
12 |
|
|
13 |
|
my $nr = 9; |
14 |
|
|
15 |
# Make sure we can load the model |
# Make sure we can load the model |
16 |
use_ok('Transports::Model::UserOnSource'); |
use_ok('Transports::Model::UserOnSource'); |
17 |
|
|
41 |
# Searches in general |
# Searches in general |
42 |
my $collection = Transports::Model::UserOnSourceCollection->new(current_user => $system_user); |
my $collection = Transports::Model::UserOnSourceCollection->new(current_user => $system_user); |
43 |
$collection->unlimit; |
$collection->unlimit; |
44 |
is($collection->count, 2, "Finds two records"); |
is($collection->count, $nr + 2, "Finds two records"); |
45 |
|
|
46 |
# Searches in specific |
# Searches in specific |
47 |
$collection->limit(column => 'id', value => $o->id); |
$collection->limit(column => 'id', value => $o->id); |
54 |
|
|
55 |
# And the other one is still there |
# And the other one is still there |
56 |
$collection->unlimit; |
$collection->unlimit; |
57 |
is($collection->count, 1, "Still one left"); |
is($collection->count, $nr + 1, "Still one left"); |
58 |
|
|