Bugzilla – Attachment 52880 Details for
Bug 16805
Log in with database admin user breaks OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16805: Add test to getalert (no param passed)
Bug-16805-Add-test-to-getalert-no-param-passed.patch (text/plain), 1.83 KB, created by
Jonathan Druart
on 2016-06-26 07:08:37 UTC
(
hide
)
Description:
Bug 16805: Add test to getalert (no param passed)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-26 07:08:37 UTC
Size:
1.83 KB
patch
obsolete
>From 75a4cded98ebfb319e06be111990df7831bce9fd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 24 Jun 2016 17:02:59 +0100 >Subject: [PATCH] Bug 16805: Add test to getalert (no param passed) > >TEST PLAN >--------- >1) apply patch >2) prove t/db_dependent/Letters.t > -- fails >3) run koha qa test tools > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Letters.t | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index a78dcde..a4ddd2a 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 73; >+use Test::More tests => 74; > use Test::MockModule; > use Test::Warn; > >@@ -210,14 +210,16 @@ my $externalid = 'my external id'; > my $alert_id = C4::Letters::addalert($borrowernumber, $type, $externalid); > isnt( $alert_id, undef, 'addalert does not return undef' ); > >-my $alerts = C4::Letters::getalert($borrowernumber); >+ >+# getalert >+my $alerts = C4::Letters::getalert(); >+is( @$alerts, 1, 'addalert should not fail without parameter' ); >+$alerts = C4::Letters::getalert($borrowernumber); > is( @$alerts, 1, 'addalert adds an alert' ); > is( $alerts->[0]->{alertid}, $alert_id, 'addalert returns the alert id correctly' ); > is( $alerts->[0]->{type}, $type, 'addalert stores the type correctly' ); > is( $alerts->[0]->{externalid}, $externalid, 'addalert stores the externalid correctly' ); > >- >-# getalert > $alerts = C4::Letters::getalert($borrowernumber, $type); > is( @$alerts, 1, 'getalert returns the correct number of alerts' ); > $alerts = C4::Letters::getalert($borrowernumber, $type, $externalid); >-- >2.8.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 16805
:
52762
|
52764
|
52827
|
52845
|
52846
|
52847
|
52877
|
52878
|
52879
| 52880 |
52881
|
52882