Bugzilla – Attachment 119051 Details for
Bug 28056
Add Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28056: Unit tests
Bug-28056-Unit-tests.patch (text/plain), 1.63 KB, created by
Martin Renvoize (ashimema)
on 2021-03-31 14:06:56 UTC
(
hide
)
Description:
Bug 28056: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-31 14:06:56 UTC
Size:
1.63 KB
patch
obsolete
>From 9c709f3cb2e135745dd9fe9e6473d2858caf5d01 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 Mar 2021 10:51:34 -0300 >Subject: [PATCH] Bug 28056: Unit tests > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/Koha/Exceptions.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/Koha/Exceptions.t b/t/Koha/Exceptions.t >index 908f6546a8..3ffb34b299 100755 >--- a/t/Koha/Exceptions.t >+++ b/t/Koha/Exceptions.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > use Test::MockObject; > use Test::Exception; > >@@ -285,3 +285,27 @@ subtest 'Koha::Exceptions::Patron::Attribute::* tests' => sub { > 'Exception not stringified if manually passed' > ); > }; >+ >+subtest 'Koha::Exceptions::Patron tests' => sub { >+ >+ plan tests => 5; >+ >+ use_ok("Koha::Exceptions::Patron"); >+ >+ my $type = 'yahey'; >+ >+ throws_ok >+ { Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute->throw( >+ type => $type ); } >+ 'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute', >+ 'Exception is thrown :-D'; >+ >+ # stringify the exception >+ is( "$@", "Missing mandatory extended attribute (type=$type)", 'Exception stringified correctly' ); >+ >+ throws_ok >+ { Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute->throw( "Manual message exception" ) } >+ 'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute', >+ 'Exception is thrown :-D'; >+ is( "$@", 'Manual message exception', 'Exception not stringified if manually passed' ); >+}; >-- >2.20.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 28056
:
119007
|
119008
|
119051
|
119052
|
119072
|
119073