- Fixed RPC delete_bulk not working at all
- Added REST and RPC update_bulk tests
- Removed useless RPC index action
+- Fixed static configured page attribute not being used (RT#56226)
2.002002 2010-08-03 14:40:50 Europe/Vienna
as => $self->as || ((scalar(@{$static->as})) ? $static->as : undef),
prefetch => $self->prefetch || $static->prefetch || undef,
rows => $self->count || $static->count,
+ page => $static->page,
offset => $self->offset,
join => $self->build_joins,
};
create_requires => ['cd', 'title' ],
create_allows => ['cd', 'title', 'position' ],
update_allows => ['title', 'position', { cd => ['*'] }],
+ page => 1,
+ count => 10,
);
1;
my $filtered_artist_list_url = "$base/api/rest/bound_artist";
my $producer_list_url = "$base/api/rest/producer";
my $cd_list_url = "$base/api/rest/cd";
+my $track_list_url = "$base/api/rest/track";
# test open request
{
is_deeply( $response, { list => \@expected_response, success => 'true' }, 'correct data returned for multiple search params' );
}
+# page specified in controller config (RT#56226)
+{
+ my $uri = URI->new( $track_list_url );
+ $uri->query_form();
+ my $req = GET( $uri, 'Accept' => 'text/x-json' );
+ $mech->request($req);
+ cmp_ok( $mech->status, '==', 200, 'get first page ok' );
+ my $response = JSON::Any->Load( $mech->content);
+ my @expected_response = map { { $_->get_columns } } $schema->resultset('Track')->search(undef, {
+ page => 1,
+ })->all;
+ is_deeply( $response, { list => \@expected_response, success => 'true', totalcount => 15 }, 'correct data returned for static configured paging' );
+}
+
done_testing();