Bugzilla – Attachment 57201 Details for
Bug 17552
Koha::Objects->reset does no longer allow chaining
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17552: Continue revert and add tests to highlight the problem
Bug-17552-Continue-revert-and-add-tests-to-highlig.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2016-11-04 14:09:59 UTC
(
hide
)
Description:
Bug 17552: Continue revert and add tests to highlight the problem
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-04 14:09:59 UTC
Size:
1.88 KB
patch
obsolete
>From 3c047a331c6f0ed1edd03d39a7d72937f5cdbcb9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 4 Nov 2016 13:49:57 +0000 >Subject: [PATCH] Bug 17552: Continue revert and add tests to highlight the > problem > >--- > Koha/Objects.pm | 4 ++-- > t/db_dependent/Koha/Objects.t | 4 +++- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index da2f2c9..56f165c 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -292,14 +292,14 @@ The autoload method is used call DBIx::Class method on a resultset. > > Important: If you plan to use one of the DBIx::Class methods you must provide > relevant tests in t/db_dependent/Koha/Objects.t >-Currently count, pager, reset, update and delete are covered. >+Currently count, pager, update and delete are covered. > > =cut > > sub AUTOLOAD { > my ( $self, @params ) = @_; > >- my @known_methods = qw( count pager reset update delete result_class ); >+ my @known_methods = qw( count pager update delete result_class ); > my $method = our $AUTOLOAD; > $method =~ s/.*:://; > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index de36f54..84b1a86 100644 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -64,11 +64,13 @@ subtest 'pager' => sub { > }; > > subtest 'reset' => sub { >- plan tests => 1; >+ plan tests => 3; > > my $patrons = Koha::Patrons->search; > my $first_borrowernumber = $patrons->next->borrowernumber; > my $second_borrowernumber = $patrons->next->borrowernumber; >+ is( ref( $patrons->reset ), 'Koha::Patrons', 'Koha::Objects->reset should allow chaining' ); >+ is( ref( $patrons->reset->next ), 'Koha::Patron', 'Koha::Objects->reset should allow chaining' ); > is( $patrons->reset->next->borrowernumber, $first_borrowernumber, 'Koha::Objects->reset should work as expected'); > }; > >-- >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 17552
:
57200
|
57201
|
57209
|
57210
|
57230
|
57231