Lines 159-168
subtest 'TO_JSON tests' => sub {
Link Here
|
159 |
my $lost = $patron->TO_JSON()->{lost}; |
159 |
my $lost = $patron->TO_JSON()->{lost}; |
160 |
my $gonenoaddress = $patron->TO_JSON->{gonenoaddress}; |
160 |
my $gonenoaddress = $patron->TO_JSON->{gonenoaddress}; |
161 |
|
161 |
|
162 |
ok( $lost->isa('Mojo::JSON::_Bool'), 'Boolean attribute type is correct' ); |
162 |
ok( $lost->isa('JSON::PP::Boolean'), 'Boolean attribute type is correct' ); |
163 |
is( $lost, 1, 'Boolean attribute value is correct (true)' ); |
163 |
is( $lost, 1, 'Boolean attribute value is correct (true)' ); |
164 |
|
164 |
|
165 |
ok( $gonenoaddress->isa('Mojo::JSON::_Bool'), 'Boolean attribute type is correct' ); |
165 |
ok( $gonenoaddress->isa('JSON::PP::Boolean'), 'Boolean attribute type is correct' ); |
166 |
is( $gonenoaddress, 0, 'Boolean attribute value is correct (false)' ); |
166 |
is( $gonenoaddress, 0, 'Boolean attribute value is correct (false)' ); |
167 |
|
167 |
|
168 |
ok( !isvstring($patron->borrowernumber), 'Integer values are not coded as strings' ); |
168 |
ok( !isvstring($patron->borrowernumber), 'Integer values are not coded as strings' ); |
169 |
- |
|
|