Bugzilla – Attachment 135791 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.28 KB, created by
Jonathan Druart
on 2022-06-08 09:41:28 UTC
(
hide
)
Description:
Bug 30399: Make Patron.t pass even if mandatory attributes exist
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-08 09:41:28 UTC
Size:
2.28 KB
patch
obsolete
>From 23b8839294b3e6b25a2660e504486585a992b005 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. >--- > 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 c27dfc405f4..37214105e52 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.25.1
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