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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 523a2f297d
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
ffbaee5afa
commit
efcd9f8798
1 changed files with 6 additions and 0 deletions
|
@ -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' });
|
||||
|
||||
|
|
Loading…
Reference in a new issue