|
Lines 120-126
subtest 'list_effective_rules() tests' => sub {
Link Here
|
| 120 |
"Given I added an issuing rule branchcode => $branchcode," . ' categorycode => undef, itemtype => undef,' |
120 |
"Given I added an issuing rule branchcode => $branchcode," . ' categorycode => undef, itemtype => undef,' |
| 121 |
); |
121 |
); |
| 122 |
|
122 |
|
| 123 |
$t->get_ok("//$userid:$password@/api/v1/circulation_rules?library=$branchcode")->status_is(200)->json_is( |
123 |
$t->get_ok("//$userid:$password@/api/v1/circulation_rules?library_id=$branchcode")->status_is(200)->json_is( |
| 124 |
'' => { |
124 |
'' => { |
| 125 |
fine => 4, |
125 |
fine => 4, |
| 126 |
finedays => 5, |
126 |
finedays => 5, |
|
Lines 141-147
subtest 'list_effective_rules() tests' => sub {
Link Here
|
| 141 |
->json_is( [ { path => '/query/rules_blah', message => 'Malformed query string' } ] ); |
141 |
->json_is( [ { path => '/query/rules_blah', message => 'Malformed query string' } ] ); |
| 142 |
|
142 |
|
| 143 |
# Warn on incorrect query parameter value |
143 |
# Warn on incorrect query parameter value |
| 144 |
$t->get_ok("//$userid:$password@/api/v1/circulation_rules?library=SMITH")->status_is(400)->json_is( |
144 |
$t->get_ok("//$userid:$password@/api/v1/circulation_rules?library_id=SMITH")->status_is(400)->json_is( |
| 145 |
'' => { |
145 |
'' => { |
| 146 |
error => 'Invalid parameter value', |
146 |
error => 'Invalid parameter value', |
| 147 |
error_code => 'invalid_parameter_value', |
147 |
error_code => 'invalid_parameter_value', |
| 148 |
- |
|
|