View | Details | Raw Unified | Return to bug 22222
Collapse All | Expand All

(-)a/Koha/SharedContent.pm (-2 / +2 lines)
Lines 154-160 sub build_request { Link Here
154
    if ( $type eq 'get' ) {
154
    if ( $type eq 'get' ) {
155
        my $params = shift;
155
        my $params = shift;
156
        $params = join '&',
156
        $params = join '&',
157
            map { defined $params->{$_} ? $_ . "=" . $params->{$_} : () }
157
            map { defined $params->{$_} && $params->{$_} ne '' ? $_ . "=" . $params->{$_} : () }
158
            keys %$params;
158
            keys %$params;
159
        my $url = "$mana_url/$resource.json?$params";
159
        my $url = "$mana_url/$resource.json?$params";
160
        return HTTP::Request->new( GET => $url );
160
        return HTTP::Request->new( GET => $url );
Lines 164-170 sub build_request { Link Here
164
        my $id = shift;
164
        my $id = shift;
165
        my $params = shift;
165
        my $params = shift;
166
        $params = join '&',
166
        $params = join '&',
167
            map { defined $params->{$_} ? $_ . "=" . $params->{$_} : () }
167
            map { defined $params->{$_} && $params->{$_} ne '' ? $_ . "=" . $params->{$_} : () }
168
            keys %$params;
168
            keys %$params;
169
169
170
        my $url = "$mana_url/$resource/$id.json?$params";
170
        my $url = "$mana_url/$resource/$id.json?$params";
(-)a/t/db_dependent/Koha/SharedContent.t (-2 / +1 lines)
Lines 82-88 is($request->method, 'GET', 'Get subscription - Method is get'); Link Here
82
my %query = $request->uri->query_form;
82
my %query = $request->uri->query_form;
83
is($query{title}, 'The English historical review', 'Check title');
83
is($query{title}, 'The English historical review', 'Check title');
84
is($query{issn}, '0013-8266', 'Check issn');
84
is($query{issn}, '0013-8266', 'Check issn');
85
is($query{ean}, '', 'Check ean');
85
is($query{ean}, undef, 'Check ean');
86
is($query{publishercode}, 'Longman', 'Check publisher');
86
is($query{publishercode}, 'Longman', 'Check publisher');
87
87
88
is($request->uri->path, '/subscription.json', 'Path is subscription');
88
is($request->uri->path, '/subscription.json', 'Path is subscription');
89
- 

Return to bug 22222