Bugzilla – Attachment 76921 Details for
Bug 20287
Move AddMember and ModMember to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20287: Fix tests expecting a warning
Bug-20287-Fix-tests-expecting-a-warning.patch (text/plain), 1.91 KB, created by
Jonathan Druart
on 2018-07-12 18:50:40 UTC
(
hide
)
Description:
Bug 20287: Fix tests expecting a warning
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-12 18:50:40 UTC
Size:
1.91 KB
patch
obsolete
>From 1b0fd9580b3d7021a4b39210f25aad03de2f69f5 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 29 Mar 2018 13:34:25 -0300 >Subject: [PATCH] Bug 20287: Fix tests expecting a warning > >The new Koha::Patron-based implementation encapsulates some error >conditions that raised warnings and the tests expected that warning. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/api/v1/patrons.t | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/api/v1/patrons.t b/t/db_dependent/api/v1/patrons.t >index ee41a21a1b..7c148011df 100644 >--- a/t/db_dependent/api/v1/patrons.t >+++ b/t/db_dependent/api/v1/patrons.t >@@ -254,7 +254,7 @@ subtest 'update() tests' => sub { > $schema->storage->txn_rollback; > > subtest 'librarian access tests' => sub { >- plan tests => 23; >+ plan tests => 22; > > $schema->storage->txn_begin; > >@@ -284,11 +284,9 @@ subtest 'update() tests' => sub { > $newpatron->{category_id} = $deleted_category_id; > $tx = $t->ua->build_tx(PUT => "/api/v1/patrons/$patron_id_2" => json => $newpatron ); > $tx->req->cookies({name => 'CGISESSID', value => $session_id}); >- warning_like { >- $t->request_ok($tx) >- ->status_is(400) >- ->json_is('/error' => "Given category_id does not exist"); } >- qr/^DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails/; >+ $t->request_ok($tx) >+ ->status_is(400) >+ ->json_is('/error' => "Given category_id does not exist"); > $newpatron->{category_id} = $patron_2->categorycode; > > # Create a library just to make sure its ID doesn't exist on the DB >-- >2.11.0
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 20287
:
73436
|
76901
|
76902
|
76903
|
76904
|
76905
|
76906
|
76907
|
76908
|
76909
|
76910
|
76911
|
76912
|
76913
|
76914
|
76915
|
76916
|
76917
|
76918
|
76919
|
76920
| 76921 |
76922
|
76923
|
76924
|
76927
|
77221