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