8 my $base = 'http://localhost';
14 use Test::WWW::Mechanize::Catalyst 'RestTest';
15 use HTTP::Request::Common;
18 my $json = JSON->new->utf8;
20 my $mech = Test::WWW::Mechanize::Catalyst->new;
21 ok( my $schema = DBICTest->init_schema(), 'got schema' );
23 my $track_list_url = "$base/api/rpc/track_setup_dbic_args/list";
25 $schema->resultset('Track')
27 { select => [qw/me.title me.position/], order_by => 'position' } );
36 'Accept' => 'text/x-json'
39 cmp_ok( $mech->status, '==', 200, 'open attempt okay' );
41 my @expected_response = map {
43 } $base_rs->search( { position => { '!=' => '1' } } )->all;
44 my $response = $json->decode( $mech->content );
45 is_deeply( { list => \@expected_response, success => 'true' },
46 $response, 'correct message returned' );