Bugzilla – Attachment 135968 Details for
Bug 30399
Patron.t fails when there is a patron attribute that is mandatory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30399: Make Patron.t pass even if mandatory attributes exist
Bug-30399-Make-Patront-pass-even-if-mandatory-attr.patch (text/plain), 2.38 KB, created by
Katrin Fischer
on 2022-06-12 11:13:08 UTC
(
hide
)
Description:
Bug 30399: Make Patron.t pass even if mandatory attributes exist
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-06-12 11:13:08 UTC
Size:
2.38 KB
patch
obsolete
>From 3c244c6f6009c5a1ada73963d5008f78ef3f6281 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 8 Jun 2022 11:39:43 +0200 >Subject: [PATCH] Bug 30399: Make Patron.t pass even if mandatory attributes > exist > >t/db_dependent/Koha/Patron.t is failing if mandatory attributes already >exist in the DB. We can make it pass easily by deleting all the >attributes before we run the tests. > >Test plan: > prove t/db_dependent/Koha/Patron.t >must return green even if one mandatory patron attribute exists. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/Patron.t | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index c27dfc405f..37214105e5 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -377,6 +377,8 @@ subtest 'extended_attributes' => sub { > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > >+ Koha::Patron::Attribute::Types->search->delete; >+ > my $patron_1 = $builder->build_object({class=> 'Koha::Patrons'}); > my $patron_2 = $builder->build_object({class=> 'Koha::Patrons'}); > >@@ -507,6 +509,7 @@ subtest 'extended_attributes' => sub { > plan tests => 3; > > $schema->storage->txn_begin; >+ Koha::Patron::Attribute::Types->search->delete; > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > my $attribute_type = $builder->build_object( >@@ -541,6 +544,7 @@ subtest 'extended_attributes' => sub { > plan tests => 5; > > $schema->storage->txn_begin; >+ Koha::Patron::Attribute::Types->search->delete; > > my $patron_1 = $builder->build_object({ class => 'Koha::Patrons' }); > my $patron_2 = $builder->build_object({ class => 'Koha::Patrons' }); >@@ -593,6 +597,7 @@ subtest 'extended_attributes' => sub { > plan tests => 3; > > $schema->storage->txn_begin; >+ Koha::Patron::Attribute::Types->search->delete; > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > >@@ -637,6 +642,7 @@ subtest 'extended_attributes' => sub { > plan tests => 5; > > $schema->storage->txn_begin; >+ Koha::Patron::Attribute::Types->search->delete; > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > >-- >2.30.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 30399
:
135791
|
135824
| 135968