Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improve test server/controller/author
add recently removed is_deep check, extract the release_count
hash and check it separetly for having the correct keys.
  • Loading branch information
mickeyn committed Jul 9, 2016
1 parent 9a71cba commit a369827
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/server/controller/author.t
Expand Up @@ -112,6 +112,16 @@ test_psgi app, sub {

is( @{ $json->{hits}->{hits} }, 1, '1 hit' );

my $release_count = delete $doy->{release_count};
is_deeply(
[ sort keys %{$release_count} ],
[qw< backpan-only cpan latest >],
'release_count has the correct keys'
);

my $source = $json->{hits}->{hits}->[0]->{_source};
is_deeply( $doy, $source, 'same result as direct get' );

{
ok( my $res = $cb->( GET '/author/_search?q=*&size=99999' ),
'GET size=99999' );
Expand Down

0 comments on commit a369827

Please sign in to comment.