Skip to content

Commit

Permalink
a couple of test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed May 3, 2016
1 parent e972150 commit bf1028a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/MetaCPAN/Script/First.pm
Expand Up @@ -36,6 +36,8 @@ sub run {
"no release found for distribution @{[$distribution->name]}";
};
}

1;
}

__PACKAGE__->meta->make_immutable;
Expand Down
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Server/View/JSON.pm
Expand Up @@ -14,8 +14,8 @@ sub encode_json($) {
my ( $self, $c, $data ) = @_;
my $encoder
= $c->req->looks_like_browser
? Cpanel::JSON::XS->new->utf8->pretty
: Cpanel::JSON::XS->new->utf8;
? Cpanel::JSON::XS->new->utf8->allow_blessed->pretty
: Cpanel::JSON::XS->new->utf8->allow_blessed;
$encoder->encode( exists $data->{rest} ? $data->{rest} : $data );
}

Expand Down
4 changes: 2 additions & 2 deletions t/release/moose.t
Expand Up @@ -43,7 +43,7 @@ ok( $binary->binary, 'is binary' );
ok(
my $ppport
= $idx->type('file')
->filter( { term => { documentation => 'ppport.h' } } )->first,
->filter( { match => { documentation => 'ppport.h' } } )->first,
'get ppport.h'
);

Expand Down Expand Up @@ -82,7 +82,7 @@ $signature = $idx->type('file')->filter(
and => [
{ term => { name => 'SIGNATURE' } },
{ exists => { field => 'documentation' } },
{ term => { indexed => \1 } },
{ term => { indexed => 1 } },
]
}
)->first;
Expand Down
4 changes: 2 additions & 2 deletions t/release/multiple-modules.t
Expand Up @@ -114,8 +114,8 @@ ok(
my $file = $idx->type('file')->filter(
{
and => [
{ term => { release => 'Multiple-Modules-0.1' } },
{ term => { documentation => 'Moose' } }
{ term => { release => 'Multiple-Modules-0.1' } },
{ match => { documentation => 'Moose' } }
]
}
)->first,
Expand Down

0 comments on commit bf1028a

Please sign in to comment.