Lines 837-847
subtest 'TO_JSON() tests' => sub {
Link Here
|
837 |
undef, '%embed not passed, no \'metadata\' attribute' ); |
837 |
undef, '%embed not passed, no \'metadata\' attribute' ); |
838 |
is( $illreq_json->{capabilities}, |
838 |
is( $illreq_json->{capabilities}, |
839 |
undef, '%embed not passed, no \'capabilities\' attribute' ); |
839 |
undef, '%embed not passed, no \'capabilities\' attribute' ); |
840 |
is( $illreq_json->{branch}, |
840 |
is( $illreq_json->{library}, |
841 |
undef, '%embed not passed, no \'branch\' attribute' ); |
841 |
undef, '%embed not passed, no \'library\' attribute' ); |
842 |
|
842 |
|
843 |
$illreq_json = $illreq->TO_JSON( |
843 |
$illreq_json = $illreq->TO_JSON( |
844 |
{ patron => 1, metadata => 1, capabilities => 1, branch => 1 } ); |
844 |
{ patron => 1, metadata => 1, capabilities => 1, library => 1 } ); |
845 |
is( $illreq_json->{patron}->{firstname}, |
845 |
is( $illreq_json->{patron}->{firstname}, |
846 |
$patron->firstname, |
846 |
$patron->firstname, |
847 |
'%embed passed, \'patron\' attribute correct (firstname)' ); |
847 |
'%embed passed, \'patron\' attribute correct (firstname)' ); |
Lines 855-862
subtest 'TO_JSON() tests' => sub {
Link Here
|
855 |
'metawhat?', '%embed passed, \'metadata\' attribute correct' ); |
855 |
'metawhat?', '%embed passed, \'metadata\' attribute correct' ); |
856 |
is( $illreq_json->{capabilities}, |
856 |
is( $illreq_json->{capabilities}, |
857 |
'capable', '%embed passed, \'capabilities\' attribute correct' ); |
857 |
'capable', '%embed passed, \'capabilities\' attribute correct' ); |
858 |
is( $illreq_json->{branch}->{branchcode}, |
858 |
is( $illreq_json->{library}->{branchcode}, |
859 |
$library->branchcode, '%embed not passed, no \'branch\' attribute' ); |
859 |
$library->branchcode, '%embed not passed, no \'library\' attribute' ); |
860 |
|
860 |
|
861 |
$schema->storage->txn_rollback; |
861 |
$schema->storage->txn_rollback; |
862 |
}; |
862 |
}; |