Bug 29924: (follow-up) Add password_expiration_date to API
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
9b35c642e2
commit
ef58458ad4
|
|
@ -359,6 +359,13 @@ properties:
|
|||
- number
|
||||
- "null"
|
||||
description: Balance of the patron's account
|
||||
password_expiration_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date
|
||||
readOnly: true
|
||||
description: day a patron's password expires and must be changed/reset
|
||||
additionalProperties: false
|
||||
required:
|
||||
- surname
|
||||
|
|
|
|||
|
|
@ -189,6 +189,11 @@
|
|||
description: Case insensitive search on expiry_date
|
||||
required: false
|
||||
type: string
|
||||
- name: password_expiration_date
|
||||
in: query
|
||||
description: Case insensitive search on password_expiration_date
|
||||
required: false
|
||||
type: string
|
||||
- name: incorrect_address
|
||||
in: query
|
||||
description: Search on incorrect_address
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ subtest 'add() tests' => sub {
|
|||
delete $newpatron->{patron_id};
|
||||
delete $newpatron->{restricted};
|
||||
delete $newpatron->{anonymized};
|
||||
delete $newpatron->{password_expiration_date};
|
||||
|
||||
# Create a library just to make sure its ID doesn't exist on the DB
|
||||
my $library_to_delete = $builder->build_object({ class => 'Koha::Libraries' });
|
||||
|
|
@ -395,6 +396,7 @@ subtest 'add() tests' => sub {
|
|||
delete $newpatron->{patron_id};
|
||||
delete $newpatron->{restricted};
|
||||
delete $newpatron->{anonymized};
|
||||
delete $newpatron->{password_expiration_date};
|
||||
$patron_to_delete->delete;
|
||||
|
||||
# Set a date field
|
||||
|
|
@ -620,6 +622,7 @@ subtest 'update() tests' => sub {
|
|||
delete $newpatron->{patron_id};
|
||||
delete $newpatron->{restricted};
|
||||
delete $newpatron->{anonymized};
|
||||
delete $newpatron->{password_expiration_date};
|
||||
|
||||
$t->put_ok("//$userid:$password@/api/v1/patrons/-1" => json => $newpatron)
|
||||
->status_is(404)
|
||||
|
|
@ -698,6 +701,7 @@ subtest 'update() tests' => sub {
|
|||
$newpatron->{patron_id} = $unauthorized_patron->to_api->{patron_id};
|
||||
$newpatron->{restricted} = $unauthorized_patron->to_api->{restricted};
|
||||
$newpatron->{anonymized} = $unauthorized_patron->to_api->{anonymized};
|
||||
$newpatron->{password_expiration_date} = $unauthorized_patron->to_api->{password_expiration_date};
|
||||
|
||||
my $got = $result->tx->res->json;
|
||||
my $updated_on_got = delete $got->{updated_on};
|
||||
|
|
@ -729,6 +733,7 @@ subtest 'update() tests' => sub {
|
|||
delete $newpatron->{patron_id};
|
||||
delete $newpatron->{restricted};
|
||||
delete $newpatron->{anonymized};
|
||||
delete $newpatron->{password_expiration_date};
|
||||
|
||||
# attempt to update
|
||||
$authorized_patron->flags( 2**4 )->store; # borrowers flag = 4
|
||||
|
|
|
|||
Loading…
Reference in New Issue