Bugzilla – Attachment 85754 Details for
Bug 22368
Table suggestions lacks foreign key constraints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22368: Make sure the tests will always pass
Bug-22368-Make-sure-the-tests-will-always-pass.patch (text/plain), 2.70 KB, created by
Jonathan Druart
on 2019-02-26 20:26:00 UTC
(
hide
)
Description:
Bug 22368: Make sure the tests will always pass
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-02-26 20:26:00 UTC
Size:
2.70 KB
patch
obsolete
>From 0b34e7e2a5a7373647a134a18bf8a27ca4433760 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 26 Feb 2019 17:23:13 -0300 >Subject: [PATCH] Bug 22368: Make sure the tests will always pass > >Who knows! > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Suggestions.t | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Suggestions.t b/t/db_dependent/Koha/Suggestions.t >index 109488758a..480c387cb2 100644 >--- a/t/db_dependent/Koha/Suggestions.t >+++ b/t/db_dependent/Koha/Suggestions.t >@@ -105,6 +105,7 @@ subtest 'constraints' => sub { > } > ); > >+ my $nonexistent_borrowernumber = $patron->borrowernumber; > # suggestedby > $patron->delete; > $suggestion = $suggestion->get_from_storage; >@@ -124,7 +125,7 @@ subtest 'constraints' => sub { > "The suggestion is not deleted when the related branch is deleted" ); > > # managerid >- throws_ok { $suggestion->managedby(1029384756)->store; } >+ throws_ok { $suggestion->managedby($nonexistent_borrowernumber)->store; } > 'Koha::Exceptions::Object::FKConstraint', > 'store raises an exception on invalid managerid'; > my $manager = $builder->build_object( { class => "Koha::Patrons" } ); >@@ -135,7 +136,7 @@ subtest 'constraints' => sub { > "The suggestion is not deleted when the related manager is deleted" ); > > # acceptedby >- throws_ok { $suggestion->acceptedby(1029384756)->store; } >+ throws_ok { $suggestion->acceptedby($nonexistent_borrowernumber)->store; } > 'Koha::Exceptions::Object::FKConstraint', > 'store raises an exception on invalid acceptedby id'; > my $acceptor = $builder->build_object( { class => "Koha::Patrons" } ); >@@ -146,7 +147,7 @@ subtest 'constraints' => sub { > "The suggestion is not deleted when the related acceptor is deleted" ); > > # rejectedby >- throws_ok { $suggestion->rejectedby(1029384756)->store; } >+ throws_ok { $suggestion->rejectedby($nonexistent_borrowernumber)->store; } > 'Koha::Exceptions::Object::FKConstraint', > 'store raises an exception on invalid rejectedby id'; > my $rejecter = $builder->build_object( { class => "Koha::Patrons" } ); >@@ -157,7 +158,7 @@ subtest 'constraints' => sub { > "The suggestion is not deleted when the related rejecter is deleted" ); > > # budgetid >- throws_ok { $suggestion->budgetid(1029384756)->store; } >+ throws_ok { $suggestion->budgetid($nonexistent_borrowernumber)->store; } > 'Koha::Exceptions::Object::FKConstraint', > 'store raises an exception on invalid budgetid'; > my $fund = $builder->build_object( { class => "Koha::Acquisition::Funds" } ); >-- >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 22368
:
85278
|
85279
|
85282
|
85283
|
85286
|
85287
|
85309
|
85310
|
85377
|
85378
|
85379
|
85388
|
85608
|
85609
|
85610
|
85611
|
85612
|
85723
|
85725
|
85726
|
85727
|
85728
|
85729
|
85739
|
85742
|
85743
|
85744
|
85745
|
85746
|
85747
| 85754