Bugzilla – Attachment 74493 Details for
Bug 20568
Add API key management interface for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20568: (QA follow-up) Test client_id and secret are not overwritten
Bug-20568-QA-follow-up-Test-clientid-and-secret-ar.patch (text/plain), 1.68 KB, created by
Julian Maurice
on 2018-04-18 18:13:35 UTC
(
hide
)
Description:
Bug 20568: (QA follow-up) Test client_id and secret are not overwritten
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-04-18 18:13:35 UTC
Size:
1.68 KB
patch
obsolete
>From 0c8e738d1b42ae3deb8a122b63dddff1519dfcce Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 18 Apr 2018 13:56:00 -0300 >Subject: [PATCH] Bug 20568: (QA follow-up) Test client_id and secret are not > overwritten > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Koha/ApiKeys.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/ApiKeys.t b/t/db_dependent/Koha/ApiKeys.t >index 08f7ee9fb3..7becc0dcb1 100755 >--- a/t/db_dependent/Koha/ApiKeys.t >+++ b/t/db_dependent/Koha/ApiKeys.t >@@ -35,7 +35,7 @@ my $uuid_gen_secret_counter = 0; > > subtest 'store() tests' => sub { > >- plan tests => 9; >+ plan tests => 13; > > $schema->storage->txn_begin; > >@@ -65,6 +65,16 @@ subtest 'store() tests' => sub { > is( $api_key->description, $description, 'Description is correctly stored' ); > is( $api_key->active, 1, 'Key is active by default' ); > >+ # revoke, to call store >+ my $original_api_key = $api_key->unblessed; >+ $api_key->active(0)->store; >+ $api_key->discard_changes; >+ >+ is( $api_key->client_id, $original_api_key->{client_id}, '->store() preserves the client_id' ); >+ is( $api_key->secret, $original_api_key->{secret}, '->store() preserves the secret' ); >+ is( $api_key->patron_id, $original_api_key->{patron_id}, '->store() preserves the patron_id' ); >+ is( $api_key->active, 0, '->store() preserves the active value' ); >+ > my $patron_to_delete = $builder->build_object( { class => 'Koha::Patrons' } ); > my $deleted_id = $patron_to_delete->id; > $patron_to_delete->delete; >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20568
:
74179
|
74180
|
74229
|
74230
|
74231
|
74232
|
74233
|
74234
|
74235
|
74236
|
74248
|
74254
|
74255
|
74256
|
74257
|
74258
|
74259
|
74343
|
74344
|
74345
|
74346
|
74347
|
74348
|
74388
|
74389
|
74434
|
74454
|
74476
|
74477
|
74478
|
74479
|
74480
|
74481
|
74482
|
74486
|
74487
|
74488
|
74489
|
74490
|
74491
|
74492
| 74493 |
74494
|
74495
|
74496
|
74980
|
74981
|
75023
|
75186
|
75187
|
75188