Lines 81-87
t::lib::Mocks::mock_preference( 'ClaimReturnedLostValue', '99' );
Link Here
|
81 |
# Test creating a return claim |
81 |
# Test creating a return claim |
82 |
## Invalid id |
82 |
## Invalid id |
83 |
$t->post_ok( |
83 |
$t->post_ok( |
84 |
"//$userid:$password@/api/v1/return_claims/claim/1" => json => { |
84 |
"//$userid:$password@/api/v1/return_claims" => json => { |
|
|
85 |
item_id => 1, |
85 |
charge_lost_fee => Mojo::JSON->false, |
86 |
charge_lost_fee => Mojo::JSON->false, |
86 |
created_by => $librarian->id, |
87 |
created_by => $librarian->id, |
87 |
notes => "This is a test note." |
88 |
notes => "This is a test note." |
Lines 90-96
$t->post_ok(
Link Here
|
90 |
|
91 |
|
91 |
## Valid id |
92 |
## Valid id |
92 |
$t->post_ok( |
93 |
$t->post_ok( |
93 |
"//$userid:$password@/api/v1/return_claims/claim/$itemnumber1" => json => { |
94 |
"//$userid:$password@/api/v1/return_claims" => json => { |
|
|
95 |
item_id => $itemnumber1, |
94 |
charge_lost_fee => Mojo::JSON->false, |
96 |
charge_lost_fee => Mojo::JSON->false, |
95 |
created_by => $librarian->id, |
97 |
created_by => $librarian->id, |
96 |
notes => "This is a test note." |
98 |
notes => "This is a test note." |
Lines 100-106
my $claim_id = $t->tx->res->json->{id};
Link Here
|
100 |
|
102 |
|
101 |
## Duplicate id |
103 |
## Duplicate id |
102 |
$t->post_ok( |
104 |
$t->post_ok( |
103 |
"//$userid:$password@/api/v1/return_claims/claim/$itemnumber1" => json => { |
105 |
"//$userid:$password@/api/v1/return_claims" => json => { |
|
|
106 |
item_id => $itemnumber1, |
104 |
charge_lost_fee => Mojo::JSON->false, |
107 |
charge_lost_fee => Mojo::JSON->false, |
105 |
created_by => $librarian->id, |
108 |
created_by => $librarian->id, |
106 |
notes => "This is a test note." |
109 |
notes => "This is a test note." |
107 |
- |
|
|