Bugzilla – Attachment 66971 Details for
Bug 18231
Add the missing id-column to koha.issuingrules-table for DBIC fixtures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18231: (follow-up) Fix t/db_dependent/Koha/Objects.t
Bug-18231-follow-up-Fix-tdbdependentKohaObjectst.patch (text/plain), 2.18 KB, created by
Alex Buckley
on 2017-09-08 04:40:42 UTC
(
hide
)
Description:
Bug 18231: (follow-up) Fix t/db_dependent/Koha/Objects.t
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-09-08 04:40:42 UTC
Size:
2.18 KB
patch
obsolete
>From c6b31f39c48d7c8c677f9f5abf3784f171b97b8c Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Mon, 10 Jul 2017 17:46:29 +0300 >Subject: [PATCH] Bug 18231: (follow-up) Fix t/db_dependent/Koha/Objects.t > >This Bug broke a test in t/db_dependent/Koha/Objects.t. This patch replaces now >failing test with an equal one but targetting a different Koha-object. > >To test: >1. Apply first & second patch in this Bug and run updatedatabase.pl >2. prove t/db_dependent/Koha/Objects.t >3. Observe following failure: > DBIx::Class::ResultSet::find(): find() expects either a column/value hashref, > or a list of values corresponding to the columns of the specified unique > constraint 'primary' at /home/koha/Koha/Koha/Objects.pm line 227 >4. Apply this patch >5. prove t/db_dependent/Koha/Objects.t >6. Observe test passing > >Followed test plan, patch worked as described >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > t/db_dependent/Koha/Objects.t | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index 71b7abb..67167da 100644 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -24,7 +24,7 @@ use Test::Warn; > > use Koha::Authority::Types; > use Koha::Cities; >-use Koha::IssuingRules; >+use Koha::Notice::Templates; > use Koha::Patron::Category; > use Koha::Patron::Categories; > use Koha::Patrons; >@@ -129,9 +129,12 @@ subtest 'find' => sub { > ), undef, 'Additional where clause in find call' ); > > # check find with a composite FK >- my $rule = $builder->build({ source => 'Issuingrule' }); >- my @pk = ( $rule->{branchcode}, $rule->{categorycode}, $rule->{itemtype} ); >- is( ref(Koha::IssuingRules->find(@pk)), "Koha::IssuingRule", >+ my $letter = $builder->build({ source => 'Letter' }); >+ my @pk = ( >+ $letter->{module}, $letter->{code}, $letter->{branchcode}, >+ $letter->{message_transport_type}, $letter->{lang} >+ ); >+ is( ref(Koha::Notice::Templates->find(@pk)), "Koha::Notice::Template", > 'Find returned a Koha object for composite primary key' ); > > is( Koha::Patrons->find(), undef, 'Find returns undef if no params passed' ); >-- >2.1.4
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 18231
:
60921
|
60955
|
60964
|
61102
|
61218
|
61219
|
64966
|
64967
|
64968
|
66969
|
66970
| 66971